mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 00:27:38 +00:00
sharding: Removing Test (#92)
Former-commit-id: 24cbfacd178e77721dc50a36bec4d8c8aa0ff1cf [formerly ff1f6be335a2d30b5c7ccd309261b187fa833e4d] Former-commit-id: 1540df8a127da2d1d12f1761022dad3162814aa1
This commit is contained in:
parent
3749175c31
commit
17c0e79f1c
@ -27,51 +27,6 @@ func TestCollation_Transactions(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCollation_ProposerAddress(t *testing.T) {
|
||||
proposerAddr := common.BytesToAddress([]byte("proposer"))
|
||||
header := NewCollationHeader(big.NewInt(1), nil, big.NewInt(1), &proposerAddr, []byte{})
|
||||
body := []byte{}
|
||||
|
||||
collation := NewCollation(header, body, nil)
|
||||
|
||||
if collation.ProposerAddress().String() != proposerAddr.String() {
|
||||
t.Errorf("initialized collation does not contain correct proposer address")
|
||||
}
|
||||
}
|
||||
func TestCollation_GasUsed(t *testing.T) {
|
||||
tests := []struct {
|
||||
transactions []*types.Transaction
|
||||
gasUsed *big.Int
|
||||
}{
|
||||
{
|
||||
transactions: []*types.Transaction{
|
||||
makeTxWithGasLimit(100),
|
||||
makeTxWithGasLimit(100000),
|
||||
makeTxWithGasLimit(899900),
|
||||
},
|
||||
gasUsed: big.NewInt(1000000),
|
||||
}, {
|
||||
transactions: []*types.Transaction{},
|
||||
gasUsed: big.NewInt(0),
|
||||
},
|
||||
{
|
||||
transactions: []*types.Transaction{
|
||||
makeTxWithGasLimit(math.MaxUint64),
|
||||
makeTxWithGasLimit(9001),
|
||||
makeTxWithGasLimit(math.MaxUint64),
|
||||
},
|
||||
gasUsed: big.NewInt(0).SetUint64(math.MaxUint64),
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
got := (&Collation{transactions: tt.transactions}).GasUsed()
|
||||
if tt.gasUsed.Cmp(got) != 0 {
|
||||
t.Errorf("Returned unexpected gasUsed. Got=%v, wanted=%v", got, tt.gasUsed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestSerialize(t *testing.T) {
|
||||
tests := []struct {
|
||||
transactions []*types.Transaction
|
||||
|
Loading…
Reference in New Issue
Block a user