Documentation ¶
Index ¶
- Constants
- func BytesReverse(u []byte) []byte
- func BytesToHexString(data []byte) string
- func BytesToInt16(b []byte) int16
- func ClearBytes(arr []byte, len int)
- func CompareHeight(blockHeight uint64, heights []uint64) bool
- func FileExisted(filename string) bool
- func GetCompactUint(buf []byte) (uint64, uint8)
- func GetNonce() uint64
- func GetUint16Array(source []byte) ([]uint16, error)
- func HexStringToBytes(value string) ([]byte, error)
- func HexStringToBytesReverse(value string) ([]byte, error)
- func IntToBytes(n int) []byte
- func IsEqualBytes(b1 []byte, b2 []byte) bool
- func SetCompactUint(num uint64) []byte
- func SliceRemove(slice []uint32, h uint32) []uint32
- func ToByteArray(source []uint16) []byte
- type CompactUint
- type Fixed64
- type Inventory
- type InventoryType
- type Uint160
- type Uint256
Constants ¶
View Source
const (
HANDSHARKFAIL = -1
)
Define common error process and const
View Source
const UINT160SIZE int = 20
View Source
const UINT256SIZE int = 32
Variables ¶
This section is empty.
Functions ¶
func BytesReverse ¶
func BytesToHexString ¶
func BytesToInt16 ¶
func ClearBytes ¶
func CompareHeight ¶
func FileExisted ¶
func GetCompactUint ¶
func GetUint16Array ¶
func HexStringToBytes ¶
func HexStringToBytesReverse ¶
func IntToBytes ¶
func IsEqualBytes ¶
func SetCompactUint ¶
TODO Fix the return value to the correct number
func SliceRemove ¶
func ToByteArray ¶
Types ¶
type CompactUint ¶
type CompactUint struct {
// contains filtered or unexported fields
}
type Fixed64 ¶
type Fixed64 int64
the 64 bit fixed-point number, precise 10^-8
func StringToFixed64 ¶
type Inventory ¶
type Inventory interface { //sig.SignableData Hash() Uint256 Verify() error Type() InventoryType }
TODO: temp inventory
type InventoryType ¶
type InventoryType byte
const ( TRANSACTION InventoryType = 0x01 BLOCK InventoryType = 0x02 CONSENSUS InventoryType = 0xe0 )
type Uint160 ¶
type Uint160 [UINT160SIZE]uint8
func ToCodeHash ¶
func ToScriptHash ¶
func Uint160ParseFromBytes ¶
func (*Uint160) ToArrayReverse ¶
type Uint256 ¶
type Uint256 [UINT256SIZE]uint8
func Uint256ParseFromBytes ¶
func (*Uint256) ToArrayReverse ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.