message: verify_tx(): Handle redeem witnesses properly
diff: @@ -126,7 +126,7 @@ impl TxInWitness {
  ///
  pub fn verify_tx(&self, protocol_magic: ProtocolMagic, tx: &Tx) -> bool {
  let vec = Serializer::new_vec()
  - .write_unsigned_integer(1).expect("write byte 0x01")
  + .write_unsigned_integer(self.get_sign_tag()).expect("write sign tag")
  .serialize(&protocol_magic).expect("serialize protocol magic")
  .serialize(&tx.id()).expect("serialize Tx's Id")
  .finalize();
  @@ -137,6 +137,14 @@ impl TxInWitness {
  }
  }
  + fn get_sign_tag(&self) -> u64 {
  + match self {
  + &TxInWitness::PkWitness(_, _) => 1,
  + &TxInWitness::ScriptWitness(_, _) => unimplemented!(),
  + &TxInWitness::RedeemWitness(_, _) => 2,
  + }
  + }
  +
  /// verify the address's public key and the transaction signature
  pub fn verify(&self, protocol_magic: ProtocolMagic, address: &ExtendedAddr, tx: &Tx) -> bool {
  self.verify_address(address) && self.verify_tx(protocol_magic, tx)
  