@@ -77,7 +77,7 @@ type ForestExecutorV4<DB> = DefaultExecutor_v4<ForestKernelV4<DB>>;
7777pub type ApplyResult = anyhow:: Result < ( ApplyRet , Duration ) > ;
7878
7979pub type ApplyBlockResult =
80- anyhow:: Result < ( Vec < Receipt > , Vec < Vec < StampedEvent > > , Vec < Cid > ) , anyhow:: Error > ;
80+ anyhow:: Result < ( Vec < Receipt > , Vec < Vec < StampedEvent > > , Vec < Option < Cid > > ) , anyhow:: Error > ;
8181
8282/// Comes from <https://github.com/filecoin-project/lotus/blob/v1.23.2/chain/vm/fvm.go#L473>
8383pub const IMPLICIT_MESSAGE_GAS_LIMIT : i64 = i64:: MAX / 2 ;
@@ -357,7 +357,7 @@ where
357357 ) -> ApplyBlockResult {
358358 let mut receipts = Vec :: new ( ) ;
359359 let mut events = Vec :: new ( ) ;
360- let mut events_roots = Vec :: new ( ) ;
360+ let mut events_roots: Vec < Option < Cid > > = Vec :: new ( ) ;
361361 let mut processed = HashSet :: default ( ) ;
362362
363363 for block in messages. iter ( ) {
@@ -388,12 +388,8 @@ where
388388 let msg_receipt = ret. msg_receipt ( ) ;
389389 receipts. push ( msg_receipt. clone ( ) ) ;
390390
391- if let Some ( events_root) = ret. msg_receipt ( ) . events_root ( ) {
392- events_roots. push ( events_root) ;
393- events. push ( ret. events ( ) ) ;
394- } else {
395- events. push ( ret. events ( ) ) ;
396- }
391+ events_roots. push ( ret. msg_receipt ( ) . events_root ( ) ) ;
392+ events. push ( ret. events ( ) ) ;
397393
398394 // Add processed Cid to set of processed messages
399395 processed. insert ( cid) ;
0 commit comments