core: fix transaction hashes
This commit is contained in:
parent
42465dd002
commit
e5cdecfa9f
13 changed files with 110 additions and 90 deletions
|
@ -317,9 +317,22 @@ func initBasicChain(t *testing.T, bc *Blockchain) {
|
|||
bw := io.NewBufBinWriter()
|
||||
b.EncodeBinary(bw.BinWriter)
|
||||
require.NoError(t, bw.Err)
|
||||
t.Logf("Block1 hex: %s", hex.EncodeToString(bw.Bytes()))
|
||||
jsonB, err := b.MarshalJSON()
|
||||
require.NoError(t, err)
|
||||
t.Logf("Block1 base64: %s", base64.StdEncoding.EncodeToString(bw.Bytes()))
|
||||
t.Logf("Block1 JSON: %s", string(jsonB))
|
||||
bw.Reset()
|
||||
b.Header.EncodeBinary(bw.BinWriter)
|
||||
require.NoError(t, bw.Err)
|
||||
jsonH, err := b.Header.MarshalJSON()
|
||||
require.NoError(t, err)
|
||||
t.Logf("Header1 base64: %s", base64.StdEncoding.EncodeToString(bw.Bytes()))
|
||||
t.Logf("Header1 JSON: %s", string(jsonH))
|
||||
jsonTxMoveNeo, err := txMoveNeo.MarshalJSON()
|
||||
require.NoError(t, err)
|
||||
t.Logf("txMoveNeo hash: %s", txMoveNeo.Hash().StringLE())
|
||||
t.Logf("txMoveNeo hex: %s", hex.EncodeToString(txMoveNeo.Bytes()))
|
||||
t.Logf("txMoveNeo JSON: %s", string(jsonTxMoveNeo))
|
||||
t.Logf("txMoveNeo base64: %s", base64.StdEncoding.EncodeToString(txMoveNeo.Bytes()))
|
||||
t.Logf("txMoveGas hash: %s", txMoveGas.Hash().StringLE())
|
||||
|
||||
require.True(t, bc.GetUtilityTokenBalance(priv0ScriptHash).Cmp(big.NewInt(1000*native.GASFactor)) >= 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue