File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -432,12 +432,20 @@ impl Block for BlockFinality {
432
432
// code reading from the chain store always expects the JSON data to
433
433
// have the form of an `EthereumBlock`.
434
434
//
435
- // The serialization here will subtly use different formats because
436
- // it serializes objects of different types.
435
+ // Even though this bug is fixed now and we always use the
436
+ // serialization of an `EthereumBlock`, there are still chain stores
437
+ // in existence that used the old serialization form, and we need to
438
+ // deal with that when deserializing
437
439
//
438
440
// see also 7736e440-4c6b-11ec-8c4d-b42e99f52061
439
441
match self {
440
- BlockFinality :: Final ( block) => json:: to_value ( block) ,
442
+ BlockFinality :: Final ( block) => {
443
+ let eth_block = EthereumBlock {
444
+ block : block. clone ( ) ,
445
+ transaction_receipts : vec ! [ ] ,
446
+ } ;
447
+ json:: to_value ( eth_block)
448
+ }
441
449
BlockFinality :: NonFinal ( block) => json:: to_value ( & block. ethereum_block ) ,
442
450
}
443
451
}
You can’t perform that action at this time.
0 commit comments