erigon-pulse/turbo/builder/latest_block_built_test.go
Giulio rebuffo 6272559fb7
Separated PendingBlock behaviour to be chain agnostic (#7859)
Instead of getting the pending block with latest payload id, we just
store the latest block built and serve it in remote backend
2023-07-10 19:22:03 +02:00

16 lines
322 B
Go

package builder
import (
"testing"
"github.com/ledgerwatch/erigon/core/types"
"github.com/stretchr/testify/assert"
)
func TestLatestBlockBuilt(t *testing.T) {
s := NewLatestBlockBuiltStore()
b := types.NewBlockWithHeader(&types.Header{})
s.AddBlockBuilt(b)
assert.Equal(t, b.Header(), s.BlockBuilt().Header())
}