events: Fix nnoce check in CheckMsg
This commit is contained in:
parent
a755ca5dae
commit
3cf97c4278
@ -1,22 +0,0 @@
|
||||
package actors
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/filecoin-project/lotus/build"
|
||||
"gotest.tools/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestProvingPeriodEnd(t *testing.T) {
|
||||
assertPPE := func(setPeriodEnd uint64, height uint64, expectEnd uint64) {
|
||||
end, _ := ProvingPeriodEnd(setPeriodEnd, height)
|
||||
assert.Equal(t, expectEnd, end)
|
||||
assert.Equal(t, expectEnd, end)
|
||||
|
||||
fmt.Println(end)
|
||||
fmt.Println(end - build.PoStChallangeTime)
|
||||
}
|
||||
|
||||
// assumes proving dur of 40 epochs
|
||||
assertPPE(185, 147, 185)
|
||||
}
|
@ -18,7 +18,8 @@ func (e *calledEvents) CheckMsg(ctx context.Context, smsg store.ChainMsg, hnd Ca
|
||||
return false, true, err
|
||||
}
|
||||
|
||||
if msg.Nonce > fa.Nonce {
|
||||
// >= because actor nonce is actually the next nonce that is expected to appear on chain
|
||||
if msg.Nonce >= fa.Nonce {
|
||||
return false, true, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user