From 95b7c2856b7d25de31e653f8d91d6e7119ba95f5 Mon Sep 17 00:00:00 2001 From: zhxymh Date: Wed, 6 Jan 2021 19:43:27 +0800 Subject: [PATCH] fix test --- test/transaction_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/transaction_test.go b/test/transaction_test.go index a507f0b..8a5ad57 100644 --- a/test/transaction_test.go +++ b/test/transaction_test.go @@ -58,13 +58,12 @@ func TestGetTransactionResults(t *testing.T) { func TestGetMerklePathByTransactionID(t *testing.T) { var isTransactions = true - height, err := aelf.GetBlockHeight() - block, err := aelf.GetBlockByHeight(height, isTransactions) + block, err := aelf.GetBlockByHeight(1, isTransactions) assert.NoError(t, err) transactionID := block.Body.Transactions[0] merklePath, err := aelf.GetMerklePathByTransactionID(transactionID) assert.NoError(t, err) - assert.NotEmpty(t, merklePath) + assert.True(t, len(merklePath.MerklePathNodes) == 4) //spew.Dump("Get Merkle Path By TransactionID Result", merklePath) }