Add missing files
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
05536042f9
commit
08e74a90f9
14
chain/beacon/drand/drand_test.go
Normal file
14
chain/beacon/drand/drand_test.go
Normal file
@ -0,0 +1,14 @@
|
||||
package drand
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestPrintDrandPubkey(t *testing.T) {
|
||||
bc, err := NewDrandBeacon(1, 1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fmt.Printf("Drand Pubkey:\n%#v\n", bc.pubkey.TOML())
|
||||
}
|
12
node/modules/testing/beacon.go
Normal file
12
node/modules/testing/beacon.go
Normal file
@ -0,0 +1,12 @@
|
||||
package testing
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/filecoin-project/lotus/build"
|
||||
"github.com/filecoin-project/lotus/chain/beacon"
|
||||
)
|
||||
|
||||
func RandomBeacon() (beacon.RandomBeacon, error) {
|
||||
return beacon.NewMockBeacon(build.BlockDelay * time.Second), nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user