Skip to content

Commit c3197e3

Browse files
authored
Merge pull request #1543 from 0chain/fix/dirty-node
Add check for root
2 parents e11484c + 2676527 commit c3197e3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

code/go/0chain.net/blobbercore/handler/handler_common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func WithStatusConnectionForWM(handler common.StatusCodeResponderF) common.Statu
192192
if blobberRes.WriteMarker != nil {
193193
writemarker.SaveMarkerData(allocationID, blobberRes.WriteMarker.WM.Timestamp, blobberRes.WriteMarker.WM.ChainLength)
194194
trie := blobberRes.Trie
195-
if trie != nil {
195+
if trie != nil && blobberRes.WriteMarker.WM.AllocationRoot != blobberRes.WriteMarker.WM.PreviousAllocationRoot {
196196
_ = trie.DeleteNodes()
197197
blobberRes.Trie = nil
198198
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ require (
101101
)
102102

103103
require (
104-
github.com/0chain/common v1.20.0
104+
github.com/0chain/common v1.20.1
105105
github.com/Luzifer/go-openssl/v3 v3.1.0 // indirect
106106
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
107107
github.com/btcsuite/btcd v0.23.4 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
3636
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
3737
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
3838
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
39-
github.com/0chain/common v1.20.0 h1:Ek8YglLoTk8rfxYVB57mP2+w6XzfsztBPN3/vwH470I=
40-
github.com/0chain/common v1.20.0/go.mod h1:Lapu2Tj7z5Sm4r+X141e7vsz4NDODTEypeElYAP3iSw=
39+
github.com/0chain/common v1.20.1 h1:GHLqLF3sxGkZI8E9N9+gUc+j8+suj/V/J9noMNL47ok=
40+
github.com/0chain/common v1.20.1/go.mod h1:Lapu2Tj7z5Sm4r+X141e7vsz4NDODTEypeElYAP3iSw=
4141
github.com/0chain/errors v1.0.3 h1:QQZPFxTfnMcRdt32DXbzRQIfGWmBsKoEdszKQDb0rRM=
4242
github.com/0chain/errors v1.0.3/go.mod h1:xymD6nVgrbgttWwkpSCfLLEJbFO6iHGQwk/yeSuYkIc=
4343
github.com/0chain/gosdk v1.19.0-RC0 h1:PhHsvfEBJw9ofEFGWKqJ7UID7qMfl1LrWl2GyhIxjqE=

0 commit comments

Comments
 (0)