提交 04e276cc 编写于 作者: K Kevin Heifner

Test should honor existing compression

上级 4ef35276
......@@ -58,13 +58,14 @@ std::pair<signed_block_ptr, signed_block_ptr> corrupt_trx_in_block(validating_te
// Make a copy of the valid block and corrupt the transaction
auto copy_b = std::make_shared<signed_block>(b->clone());
auto signed_tx = copy_b->transactions.back().trx.get<packed_transaction>().get_signed_transaction();
const auto& packed_trx = copy_b->transactions.back().trx.get<packed_transaction>();
auto signed_tx = packed_trx.get_signed_transaction();
// Corrupt one signature
signed_tx.signatures.clear();
signed_tx.sign(main.get_private_key(act_name, "active"), main.control->get_chain_id());
// Replace the valid transaction with the invalid transaction
auto invalid_packed_tx = packed_transaction(signed_tx);
auto invalid_packed_tx = packed_transaction(signed_tx, packed_trx.get_compression());
copy_b->transactions.back().trx = invalid_packed_tx;
// Re-calculate the transaction merkle
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册