Skip to content

Commit

Permalink
feat: fail deal if start epoch passed (#1319)
Browse files Browse the repository at this point in the history
* fail deal if start epoch passed

* add suggestion

* test: add deal expiry on startup test

---------

Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
  • Loading branch information
2 people authored and LexLuthr committed Jul 20, 2023
1 parent 38ac4fc commit 8a38d46
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions storagemarket/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2429,3 +2429,17 @@ func copyFile(source string, dest string) error {

return nil
}

func mockTipset(minerAddr address.Address, height abi.ChainEpoch) (*chaintypes.TipSet, error) {
dummyCid, _ := cid.Parse("bafkqaaa")
return chaintypes.NewTipSet([]*chaintypes.BlockHeader{{
Miner: minerAddr,
Height: height,
ParentStateRoot: dummyCid,
Messages: dummyCid,
ParentMessageReceipts: dummyCid,
BlockSig: &crypto.Signature{Type: crypto.SigTypeBLS},
BLSAggregate: &crypto.Signature{Type: crypto.SigTypeBLS},
Timestamp: 1,
}})
}

0 comments on commit 8a38d46

Please sign in to comment.