File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
rolling-shutter/keyperimpl/gnosis Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -405,5 +405,12 @@ func transactionSubmittedEventToIdentityPreimage(event database.TransactionSubmi
405
405
}
406
406
407
407
func makeBlockIdentityPreimage (ev * syncevent.LatestBlock ) identitypreimage.IdentityPreimage {
408
- return identitypreimage .IdentityPreimage (ev .Number .Bytes ())
408
+ // 32 bytes of zeros plus the block number as big endian (ie starting with lots of zeros as well)
409
+ // this ensures the block identity preimage is always alphanumerically before any transaction
410
+ // identity preimages.
411
+ var buf bytes.Buffer
412
+ buf .Write (common .BigToHash (common .Big0 ).Bytes ())
413
+ buf .Write (common .BigToHash (ev .Number .Int ).Bytes ())
414
+
415
+ return identitypreimage .IdentityPreimage (buf .Bytes ())
409
416
}
You can’t perform that action at this time.
0 commit comments