feat(auto_exec): upgrade auto_exec
@@ -172,7 +172,15 @@ impl ExecutedBlock {
/// Turn this into a `ClosedBlock`.
pub fn close(mut self, conf: &BlockSysConfig) -> ClosedBlock {
- let env_info = self.env_info();
+ let mut env_info = self.env_info();
+ // In protocol version 0, 1:
+ // Auto Execution's env info author is default address
+ // In protocol version > 1:
+ // Auto Execution's env info author is block author
+ if conf.chain_version < 2 {
+ env_info.author = Address::default();
+ }
+
if conf.auto_exec {
auto_exec(
&mut self.state,
