Skip to content

Commit

Permalink
Merge pull request #5403 from wubin01/fix_getHeadBlockId
Browse files Browse the repository at this point in the history
fix(db): fix getHeadBlockId abnormal return problem
  • Loading branch information
xxo1shine authored Aug 11, 2023
2 parents 61c6177 + 5ce3ff0 commit f33c169
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions chainbase/src/main/java/org/tron/core/ChainBaseManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,7 @@ public BlockCapsule getHead() throws HeaderNotFound {
}

public synchronized BlockId getHeadBlockId() {
return new BlockId(
dynamicPropertiesStore.getLatestBlockHeaderHash(),
dynamicPropertiesStore.getLatestBlockHeaderNumber());
return new BlockId(dynamicPropertiesStore.getLatestBlockHeaderHash());
}

public long getHeadBlockNum() {
Expand Down

0 comments on commit f33c169

Please sign in to comment.