2020-10-28 11:38:06 +00:00
|
|
|
package test
|
|
|
|
|
|
|
|
import (
|
2022-06-14 15:00:51 +00:00
|
|
|
"github.com/ipfs/go-cid"
|
|
|
|
|
2020-10-28 11:38:06 +00:00
|
|
|
"github.com/filecoin-project/go-address"
|
|
|
|
"github.com/filecoin-project/go-state-types/crypto"
|
2022-06-14 15:00:51 +00:00
|
|
|
|
2020-10-28 11:38:06 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
var dummyCid cid.Cid
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
dummyCid, _ = cid.Parse("bafkqaaa")
|
|
|
|
}
|
|
|
|
|
|
|
|
func MockTipset(minerAddr address.Address, timestamp uint64) (*types.TipSet, error) {
|
|
|
|
return types.NewTipSet([]*types.BlockHeader{{
|
|
|
|
Miner: minerAddr,
|
|
|
|
Height: 5,
|
|
|
|
ParentStateRoot: dummyCid,
|
|
|
|
Messages: dummyCid,
|
|
|
|
ParentMessageReceipts: dummyCid,
|
|
|
|
BlockSig: &crypto.Signature{Type: crypto.SigTypeBLS},
|
|
|
|
BLSAggregate: &crypto.Signature{Type: crypto.SigTypeBLS},
|
|
|
|
Timestamp: timestamp,
|
|
|
|
}})
|
|
|
|
}
|