Skip to content

Commit 0498357

Browse files
Little-Peonyclaude
andcommitted
fix(chainbase): make Snapshot head field volatile in Chainbase
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1f3931f commit 0498357

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

chainbase/src/main/java/org/tron/core/db2/core/Chainbase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public enum Cursor {
3535
//true:fullnode, false:soliditynode
3636
private ThreadLocal<Cursor> cursor = new ThreadLocal<>();
3737
private ThreadLocal<Long> offset = new ThreadLocal<>();
38-
private Snapshot head;
38+
private volatile Snapshot head;
3939

4040
public Chainbase(Snapshot head) {
4141
this.head = head;

0 commit comments

Comments
 (0)