You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the function NewBUMPFromMerkleTreeAndIndex() panics if index is out of range.
To Reproduce
Run the following test
funcTestNewBUMPFromMerkleTreeAndIndex(t*testing.T) {
t.Run("index out of range", func(t*testing.T) {
_, _=bc.NewBUMPFromMerkleTreeAndIndex(1, []*chainhash.Hash{{}}, 4)
})
}
Expected behavior
Function NewBUMPFromMerkleTreeAndIndex() validates the input and returns an error with descriptive error message, thereby avoiding any possible panics from happening in the function.
System Information (please complete the following information):
Go version: 1.22.5
go-bc version: github.com/libsv/go-bc v0.1.29
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently the function
NewBUMPFromMerkleTreeAndIndex()
panics if index is out of range.To Reproduce
Run the following test
Expected behavior
Function
NewBUMPFromMerkleTreeAndIndex()
validates the input and returns an error with descriptive error message, thereby avoiding any possible panics from happening in the function.System Information (please complete the following information):
The text was updated successfully, but these errors were encountered: