@@ -147,7 +147,6 @@ public void AddCodeChange(Address address, byte[] before, byte[] after)
147147 // need more complex logic like for storage & balance changes?
148148 if ( Enumerable . SequenceEqual ( before , after ) )
149149 {
150- Console . WriteLine ( "code deployed already the same" ) ;
151150 return ;
152151 }
153152
@@ -326,7 +325,6 @@ private void StorageChange(AccountChanges accountChanges, in ReadOnlySpan<byte>
326325 // storage change edge case
327326 if ( ! HasStorageChangedDuringTx ( accountChanges . Address , storageKey , before , after ) )
328327 {
329- Console . WriteLine ( $ "unchanged! { accountChanges . Address } { Bytes . ToHexString ( storageKey ) } ") ;
330328 if ( storageChanges . Changes is not [ ] && storageChanges . Changes [ ^ 1 ] . BlockAccessIndex == Index )
331329 {
332330 _changes . Push ( new ( )
@@ -336,14 +334,12 @@ private void StorageChange(AccountChanges accountChanges, in ReadOnlySpan<byte>
336334 PreviousValue = storageChanges . Changes [ ^ 1 ] ,
337335 BlockAccessIndex = Index
338336 } ) ;
339- Console . WriteLine ( $ "removing change: { storageChanges . Changes [ ^ 1 ] } ") ;
340337
341338 storageChanges . Changes . RemoveAt ( storageChanges . Changes . Count - 1 ) ;
342339 }
343340
344341 if ( storageChanges . Changes . Count == 0 )
345342 {
346- Console . WriteLine ( $ "changes empty, removing") ;
347343 accountChanges . StorageChanges . Remove ( storageKey ) ;
348344 }
349345
@@ -480,6 +476,7 @@ private readonly bool HasBalanceChangedDuringTx(Address address, UInt256 beforeI
480476 }
481477 }
482478
479+ // assert error? should never happen
483480 throw new Exception ( "Error calculating pre tx balance" ) ;
484481 }
485482
@@ -497,7 +494,6 @@ private readonly bool HasStorageChangedDuringTx(Address address, byte[] key, in
497494
498495 foreach ( StorageChange storageChange in accountChanges . StorageChanges [ key ] . Changes . AsEnumerable ( ) . Reverse ( ) )
499496 {
500- Console . WriteLine ( $ "index={ Index } storage change = { storageChange . ToString ( ) } ") ;
501497 if ( storageChange . BlockAccessIndex != Index )
502498 {
503499 // storage changed in previous tx in block
@@ -508,20 +504,14 @@ private readonly bool HasStorageChangedDuringTx(Address address, byte[] key, in
508504 // storage only changed within this transaction
509505 foreach ( Change change in _changes )
510506 {
511- // tmp
512- if ( change . Type == ChangeType . StorageChange && change . Address == address && Enumerable . SequenceEqual ( change . Slot ! , key ) )
513- {
514- Console . WriteLine ( $ "found change with pretx={ ( change . PreTxStorage is null ? "null" : Bytes . ToHexString ( change . PreTxStorage ) ) } afterInstr={ Bytes . ToHexString ( afterInstr . ToArray ( ) ) } previousvalue={ ( change . PreviousValue is null ? "null" : change . PreviousValue ) } ") ;
515- }
516507 if ( change . Type == ChangeType . StorageChange && change . Address == address && Enumerable . SequenceEqual ( change . Slot ! , key ) && change . PreviousValue is null )
517508 {
518- Console . WriteLine ( $ "has changed = { change . PreTxStorage is null || ! Enumerable . SequenceEqual ( change . PreTxStorage , afterInstr . ToArray ( ) ) } ") ;
519-
520509 // first change of this transaction & block
521510 return change . PreTxStorage is null || ! Enumerable . SequenceEqual ( change . PreTxStorage , afterInstr . ToArray ( ) ) ;
522511 }
523512 }
524513
514+ // assert error? should never happen
525515 throw new Exception ( "Error calculating pre tx storage" ) ;
526516 }
527517
0 commit comments