Skip to content

Commit 03777fa

Browse files
author
Wenhua Zhang
committed
feat: modify state root
1 parent 25094fe commit 03777fa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

framework/src/main/java/org/tron/core/services/jsonrpc/types/BlockResult.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public BlockResult(Block block, boolean fullTx, Wallet wallet) {
9696
logsBloom = ByteArray.toJsonHex(new byte[256]); // no value
9797
transactionsRoot = ByteArray
9898
.toJsonHex(block.getBlockHeader().getRawData().getTxTrieRoot().toByteArray());
99-
stateRoot = ByteArray.toJsonHex(new byte[32]);
99+
stateRoot = ByteArray
100+
.toJsonHex(block.getBlockHeader().getRawData().getAccountStateRoot().toByteArray());
100101
receiptsRoot = ByteArray.toJsonHex(new byte[32]); // no value
101102

102103
if (blockCapsule.getNum() == 0) {

0 commit comments

Comments
 (0)