Merge pull request #89 from tamasblummer/wittness_block
add witness inv types
This commit is contained in:
commit
fb0c782df6
|
@ -31,7 +31,11 @@ pub enum InvType {
|
||||||
/// Transaction
|
/// Transaction
|
||||||
Transaction,
|
Transaction,
|
||||||
/// Block
|
/// Block
|
||||||
Block
|
Block,
|
||||||
|
/// Witness Block
|
||||||
|
WitnessBlock,
|
||||||
|
/// Witness Transaction
|
||||||
|
WitnessTransaction
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some simple messages
|
// Some simple messages
|
||||||
|
@ -103,7 +107,9 @@ impl<S: SimpleEncoder> ConsensusEncodable<S> for Inventory {
|
||||||
try!(match self.inv_type {
|
try!(match self.inv_type {
|
||||||
InvType::Error => 0u32,
|
InvType::Error => 0u32,
|
||||||
InvType::Transaction => 1,
|
InvType::Transaction => 1,
|
||||||
InvType::Block => 2
|
InvType::Block => 2,
|
||||||
|
InvType::WitnessBlock => 0x40000002,
|
||||||
|
InvType::WitnessTransaction => 0x40000001
|
||||||
}.consensus_encode(s));
|
}.consensus_encode(s));
|
||||||
self.hash.consensus_encode(s)
|
self.hash.consensus_encode(s)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue