File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,8 @@ pub struct JournalCheckpoint {
252252 pub log_i : usize ,
253253 /// Checkpoint to where on revert we will go back to and revert other journal entries.
254254 pub journal_i : usize ,
255+ /// Refund value at the time of checkpoint creation.
256+ pub refund : i64 ,
255257}
256258
257259/// State load information that contains the data and if the account or storage is cold loaded
Original file line number Diff line number Diff line change @@ -461,6 +461,7 @@ impl<ENTRY: JournalEntryTr> JournalInner<ENTRY> {
461461 let checkpoint = JournalCheckpoint {
462462 log_i : self . logs . len ( ) ,
463463 journal_i : self . journal . len ( ) ,
464+ refund : self . refund ,
464465 } ;
465466 self . depth += 1 ;
466467 checkpoint
@@ -481,6 +482,9 @@ impl<ENTRY: JournalEntryTr> JournalInner<ENTRY> {
481482 self . depth -= 1 ;
482483 self . logs . truncate ( checkpoint. log_i ) ;
483484
485+ // Restore refund to checkpoint value
486+ self . refund = checkpoint. refund ;
487+
484488 // iterate over last N journals sets and revert our global state
485489 self . journal
486490 . drain ( checkpoint. journal_i ..)
You can’t perform that action at this time.
0 commit comments