Sha256: b5e391ddb65768dccd7981fe5d89bafb2f193cbe64a5ecb41fd4ad46f495d0ef

Contents?: true

Size: 534 Bytes

Versions: 13

Compression:

Stored size: 534 Bytes

Contents

# encoding: ascii-8bit

require_relative '../spec_helper.rb'

describe 'Bitcoin::Protocol::Parser (reject)' do

  it 'parses alert' do
    payload = "\x02tx\x10\bcoinbase\xB5\x93\x84\x8D\x99\xF4\x1AE\xE9\xD2\x90T\x9919\xF0X %\xBBE\x19\x19\x86\xBC\r\x812\x7F\xC4\xEDN"

    alert = Bitcoin::Protocol::Reject.parse(payload)
    alert.message.should == "tx"
    alert.ccode.should == :invalid
    alert.reason.should == "coinbase"
    alert.tx_hash.should == "4eedc47f32810dbc86191945bb252058f03931995490d2e9451af4998d8493b5"
  end

end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
bitcoin-ruby-0.0.18 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.17 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.16 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.15 spec/bitcoin/protocol/reject.rb
monacoin-ruby-0.1.3 spec/bitcoin/protocol/reject.rb
monacoin-ruby-0.1.2 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.14 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.13 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.12 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.11 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.10 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.9 spec/bitcoin/protocol/reject.rb
bitcoin-ruby-0.0.8 spec/bitcoin/protocol/reject.rb