github.com/datachainlab/burrow@v0.25.0/execution/exec/block_execution_test.go (about)

     1  package exec
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  	"github.com/tendermint/tendermint/abci/types"
     8  )
     9  
    10  func TestBlockExecution_Marshal(t *testing.T) {
    11  	be := &BlockExecution{
    12  		Header: &types.Header{
    13  			Height:          3,
    14  			AppHash:         []byte{2},
    15  			ProposerAddress: []byte{1, 2, 33},
    16  		},
    17  	}
    18  	bs, err := be.Marshal()
    19  	require.NoError(t, err)
    20  	beOut := new(BlockExecution)
    21  	require.NoError(t, beOut.Unmarshal(bs))
    22  }