WIP
This commit is contained in:
parent
fb358d5e9a
commit
c0ca2d3c91
@ -688,7 +688,9 @@ do_spend2(PrivKey,
|
||||
{nonce, int},
|
||||
{payload, binary}],
|
||||
BinaryTX = aeser_chain_objects:serialize(Type, Vsn, Template, Fields),
|
||||
tell("BinaryTX: ~p", [BinaryTX]),
|
||||
NetworkTX = <<ChainID/binary, BinaryTX/binary>>,
|
||||
tell("NetworkTX: ~p", [NetworkTX]),
|
||||
Signature = ecu_eddsa:sign_detached(NetworkTX, PrivKey),
|
||||
SigTxType = signed_tx,
|
||||
SigTxVsn = 1,
|
||||
@ -697,10 +699,11 @@ do_spend2(PrivKey,
|
||||
{transaction, binary}],
|
||||
TX_Data =
|
||||
[{signatures, [Signature]},
|
||||
{transaction, NetworkTX}],
|
||||
{transaction, BinaryTX}],
|
||||
SignedTX = aeser_chain_objects:serialize(SigTxType, SigTxVsn, SigTemplate, TX_Data),
|
||||
tell("SignedTX: ~p", [SignedTX]),
|
||||
Encoded = aeser_api_encoder:encode(transaction, SignedTX),
|
||||
tell("SpendTX: ~p", [Encoded]),
|
||||
tell("Encoded: ~p", [Encoded]),
|
||||
Outcome = hz:post_tx(Encoded),
|
||||
tell("Outcome: ~p", [Outcome]).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user