diff --git a/sharding/collation.go b/sharding/collation.go index 9221b388e..108c9ca0f 100644 --- a/sharding/collation.go +++ b/sharding/collation.go @@ -220,9 +220,6 @@ func (ch Chunks) Len() int { return len(ch) } // GetRlp returns the RLP encoding of one chunk from the list. func (ch Chunks) GetRlp(i int) []byte { - bytes, err := rlp.EncodeToBytes(ch[i]) - if err != nil { - panic(err) - } + bytes, _ := rlp.EncodeToBytes(ch[i]) return bytes } diff --git a/sharding/collation_test.go b/sharding/collation_test.go index cfb517abd..5d74907c0 100644 --- a/sharding/collation_test.go +++ b/sharding/collation_test.go @@ -1,8 +1,6 @@ package sharding import ( - "fmt" - "bytes" "crypto/rand" "math/big" @@ -141,13 +139,9 @@ func Test_CalculatePOC(t *testing.T) { makeTxWithGasLimit(100), } c := NewCollation(header, body, transactions) - c.CalculateChunkRoot() salt := []byte{1, 0x9f} - fmt.Printf("%x\n", c.header.data.ChunkRoot) poc := c.CalculatePOC(salt) - fmt.Printf("%x\n", c.header.data.ChunkRoot) - fmt.Printf("%x\n", poc) if poc == *c.header.data.ChunkRoot { t.Errorf("Proof of Custody with Salt: %x does not differ from ChunkRoot without salt.", salt)