Constructor
new InvItem(type, hash)
Create an inv item.
Parameters:
Name | Type | Description |
---|---|---|
type |
InvItem.types | |
hash |
Hash |
Properties:
Name | Type | Description |
---|---|---|
type |
InvType | |
hash |
Hash |
- Source:
Members
(static) types :Number
Inv types.
Type:
- Number
Properties:
Name | Type | Description |
---|---|---|
TX |
Number | |
BLOCK |
Number | |
FILTERED_BLOCK |
Number | |
CMPCT_BLOCK |
Number | |
CLAIM |
Number | |
AIRDROP |
Number |
- Default Value:
{"TX":1,"BLOCK":2,"FILTERED_BLOCK":3,"CMPCT_BLOCK":4,"CLAIM":5,"AIRDROP":6}
- Source:
(static, constant) typesByVal :Object
Inv types by value.
Type:
- Object
- Source:
Methods
getSize() → {Number}
Write inv item to buffer writer.
- Source:
Returns:
- Type
- Number
isAirdrop() → {Boolean}
Test whether the inv item is an airdrop proof.
- Source:
Returns:
- Type
- Boolean
isBlock() → {Boolean}
Test whether the inv item is a block.
- Source:
Returns:
- Type
- Boolean
isClaim() → {Boolean}
Test whether the inv item is a claim.
- Source:
Returns:
- Type
- Boolean
isTX() → {Boolean}
Test whether the inv item is a tx.
- Source:
Returns:
- Type
- Boolean
read(br) → {this}
Inject properties from buffer reader.
Parameters:
Name | Type | Description |
---|---|---|
br |
bio.BufferReader |
- Source:
Returns:
- Type
- this
write(bw) → {BufioWriter}
Write inv item to buffer writer.
Parameters:
Name | Type | Description |
---|---|---|
bw |
BufioWriter |
- Source:
Returns:
- Type
- BufioWriter