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