MCPcopy Index your code
hub / github.com/chain/Core / TestWaitForBlockSoonDistantFuture

Function TestWaitForBlockSoonDistantFuture

protocol/block_test.go:76–84  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestWaitForBlockSoonDistantFuture(t *testing.T) {
77 c, _ := newTestChain(t, time.Now())
78
79 got := <-c.BlockSoonWaiter(context.Background(), 100) // distant future
80 want := ErrTheDistantFuture
81 if got != want {
82 t.Errorf("BlockSoonWaiter(100) = %+v want %+v", got, want)
83 }
84}
85
86func TestWaitForBlockSoonWaits(t *testing.T) {
87 // This test is inherently racy. It's possible

Callers

nothing calls this directly

Calls 2

newTestChainFunction · 0.85
BlockSoonWaiterMethod · 0.80

Tested by

no test coverage detected