Add missing files

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-04-15 16:13:20 +02:00
parent 05536042f9
commit 08e74a90f9
2 changed files with 26 additions and 0 deletions

View 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())
}

View 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
}