Skip to content

Commit

Permalink
add witness inv types
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasblummer committed May 28, 2018
1 parent feec1ca commit 9f2d737
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/network/message_blockdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ pub enum InvType {
/// Transaction
Transaction,
/// Block
Block
Block,
/// Witness Block
WitnessBlock,
/// Witness Transaction
WitnessTransaction
}

// Some simple messages
Expand Down Expand Up @@ -103,7 +107,9 @@ impl<S: SimpleEncoder> ConsensusEncodable<S> for Inventory {
try!(match self.inv_type {
InvType::Error => 0u32,
InvType::Transaction => 1,
InvType::Block => 2
InvType::Block => 2,
InvType::WitnessBlock => 0x40000002,
InvType::WitnessTransaction => 0x40000001
}.consensus_encode(s));
self.hash.consensus_encode(s)
}
Expand Down

0 comments on commit 9f2d737

Please sign in to comment.