You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java-tron version: v4.7.2
OS & Version: Linux & macOS
Expected behavior
The getHeadBlockId function should return the correct block header information.
Actual behavior
When synchronizing blocks, an abnormal block ID appears, as shown in the following log:
This ID: 00000000032b9cc50deb2777f7e751ade0245ace23c2cc8579d733af34401832 is composed of two parts, the number of block 53189829 and the hash of block 53189830. The reason for this phenomenon is that there is a concurrency problem in this function. The function definition is as follows:
public synchronized BlockId getHeadBlockId() {
return new BlockId(
dynamicPropertiesStore.getLatestBlockHeaderHash(),
dynamicPropertiesStore.getLatestBlockHeaderNumber());
}
When calling this function, if only the block hash is written at this time, and the block number has not been written in time, the above-mentioned situation will occur.
The text was updated successfully, but these errors were encountered:
System information
Java-tron version: v4.7.2
OS & Version: Linux & macOS
Expected behavior
The
getHeadBlockId
function should return the correct block header information.Actual behavior
When synchronizing blocks, an abnormal block ID appears, as shown in the following log:
This ID:
00000000032b9cc50deb2777f7e751ade0245ace23c2cc8579d733af34401832
is composed of two parts, the number of block 53189829 and the hash of block 53189830. The reason for this phenomenon is that there is a concurrency problem in this function. The function definition is as follows:When calling this function, if only the block hash is written at this time, and the block number has not been written in time, the above-mentioned situation will occur.
The text was updated successfully, but these errors were encountered: