Improved catching up and refactored
This commit is contained in:
@@ -9,6 +9,22 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Bytes []byte
|
||||
|
||||
func (self Bytes) String() string {
|
||||
return string(self)
|
||||
}
|
||||
|
||||
func DeleteFromByteSlice(s [][]byte, hash []byte) [][]byte {
|
||||
for i, h := range s {
|
||||
if bytes.Compare(h, hash) == 0 {
|
||||
return append(s[:i], s[i+1:]...)
|
||||
}
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
// Number to bytes
|
||||
//
|
||||
// Returns the number in bytes with the specified base
|
||||
|
Reference in New Issue
Block a user