diff --git a/chain/actors/builtin/miner/state.go.template b/chain/actors/builtin/miner/state.go.template index 09c1202d9..b63a73a2c 100644 --- a/chain/actors/builtin/miner/state.go.template +++ b/chain/actors/builtin/miner/state.go.template @@ -479,12 +479,15 @@ func (s *state{{.v}}) EraseAllUnproven() error { return dls.UpdateDeadline(s.store, dindx, dl) }) + if err != nil { + return err + } return s.State.SaveDeadlines(s.store, dls) {{else}} // field doesn't exist until v2 + return nil {{end}} - return nil } func (d *deadline{{.v}}) LoadPartition(idx uint64) (Partition, error) { diff --git a/chain/actors/builtin/miner/v0.go b/chain/actors/builtin/miner/v0.go index cd922645e..422afec8a 100644 --- a/chain/actors/builtin/miner/v0.go +++ b/chain/actors/builtin/miner/v0.go @@ -444,8 +444,8 @@ func (s *state0) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreC func (s *state0) EraseAllUnproven() error { // field doesn't exist until v2 - return nil + } func (d *deadline0) LoadPartition(idx uint64) (Partition, error) { diff --git a/chain/actors/builtin/miner/v2.go b/chain/actors/builtin/miner/v2.go index 5de653fe4..81b32abb7 100644 --- a/chain/actors/builtin/miner/v2.go +++ b/chain/actors/builtin/miner/v2.go @@ -470,10 +470,12 @@ func (s *state2) EraseAllUnproven() error { return dls.UpdateDeadline(s.store, dindx, dl) }) + if err != nil { + return err + } return s.State.SaveDeadlines(s.store, dls) - return nil } func (d *deadline2) LoadPartition(idx uint64) (Partition, error) { diff --git a/chain/actors/builtin/miner/v3.go b/chain/actors/builtin/miner/v3.go index 1819428a6..8ac77915a 100644 --- a/chain/actors/builtin/miner/v3.go +++ b/chain/actors/builtin/miner/v3.go @@ -467,10 +467,12 @@ func (s *state3) EraseAllUnproven() error { return dls.UpdateDeadline(s.store, dindx, dl) }) + if err != nil { + return err + } return s.State.SaveDeadlines(s.store, dls) - return nil } func (d *deadline3) LoadPartition(idx uint64) (Partition, error) { diff --git a/chain/actors/builtin/miner/v4.go b/chain/actors/builtin/miner/v4.go index 5a3a75053..5f442962f 100644 --- a/chain/actors/builtin/miner/v4.go +++ b/chain/actors/builtin/miner/v4.go @@ -467,10 +467,12 @@ func (s *state4) EraseAllUnproven() error { return dls.UpdateDeadline(s.store, dindx, dl) }) + if err != nil { + return err + } return s.State.SaveDeadlines(s.store, dls) - return nil } func (d *deadline4) LoadPartition(idx uint64) (Partition, error) { diff --git a/chain/actors/builtin/miner/v5.go b/chain/actors/builtin/miner/v5.go index 82e98c2ef..a3e03a7d4 100644 --- a/chain/actors/builtin/miner/v5.go +++ b/chain/actors/builtin/miner/v5.go @@ -467,10 +467,12 @@ func (s *state5) EraseAllUnproven() error { return dls.UpdateDeadline(s.store, dindx, dl) }) + if err != nil { + return err + } return s.State.SaveDeadlines(s.store, dls) - return nil } func (d *deadline5) LoadPartition(idx uint64) (Partition, error) {