Commit 27b0befb authored by shandongzhejiang's avatar shandongzhejiang Committed by GitHub

fix: fix slice init length (#11542)

Signed-off-by: default avatarshandongzhejiang <shandongzhejiang@icloud.com>
parent bffe5540
...@@ -169,7 +169,7 @@ func mockPreimageOracleData() *types.PreimageOracleData { ...@@ -169,7 +169,7 @@ func mockPreimageOracleData() *types.PreimageOracleData {
for i := 0; i < keccakTypes.BlockSize; i++ { for i := 0; i < keccakTypes.BlockSize; i++ {
fullLeaf[i] = byte(i) fullLeaf[i] = byte(i)
} }
oracleData := make([]byte, 5*MaxBlocksPerChunk) oracleData := make([]byte, 0, 5*MaxBlocksPerChunk)
for i := 0; i < 5*MaxBlocksPerChunk; i++ { for i := 0; i < 5*MaxBlocksPerChunk; i++ {
oracleData = append(oracleData, fullLeaf...) oracleData = append(oracleData, fullLeaf...)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment