forked from lthn/blockchain
test code for wallet2::update_asset
This commit is contained in:
parent
b2b4342c14
commit
42b5f32116
1 changed files with 12 additions and 1 deletions
|
|
@ -5640,7 +5640,18 @@ void wallet2::update_asset(const crypto::public_key& asset_id, const currency::a
|
|||
ctp.tx_meaning_for_logs = "asset eth update";
|
||||
}
|
||||
|
||||
this->transfer(ctp, ft, send_to_network, nullptr);
|
||||
// old:
|
||||
//this->transfer(ctp, ft, send_to_network, nullptr);
|
||||
|
||||
//// test code -- TODO remove this -- sowle
|
||||
this->transfer(ctp, ft, false, nullptr);
|
||||
crypto::hash h1 = get_transaction_hash(ft.tx);
|
||||
blobdata tx_blob = t_serializable_object_to_blob(ft.tx);
|
||||
transaction tx{};
|
||||
parse_and_validate_tx_from_blob(tx_blob, tx);
|
||||
crypto::hash h2 = get_transaction_hash(tx);
|
||||
CHECK_AND_ASSERT_THROW_MES(h1 == h2, "h1 != h2");
|
||||
//// end of test code
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
void wallet2::update_asset(const crypto::public_key& asset_id, const currency::asset_descriptor_base new_descriptor, currency::transaction& result_tx)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue