Files
sharp-coin/spec/btc_wire_proto_spec.rb

84 lines
1.2 KiB
Ruby

require 'spec_helper'
require 'btc_wire_proto'
# Fixtures data. Taken from: https://en.bitcoin.it/wiki/Protocol_specification
SERVICE_MASK = "\x00\x00\x00\x01" # Sets NODE_NETWORK
describe BtcWireProto do
# Payload fragments
describe ServicesMask do
it "should have node_network set to false when its bit is 0" do
s = BtcWireProto::ServicesMask::read("\x00\x00\x00\x00")
s.node_network.should == false
end
end
describe NetAddr do
end
describe TimestampedNetAddr do
end
describe VarInt do
end
describe VarStr do
end
describe InventoryVector do
end
describe Sha256 do
end
describe TransactionIn do
end
describe TransactionOut do
end
describe BlockHeader do
end
# Payloads
describe Version do
end
describe AddrPre31402 do
end
describe AddrFrom31402 do
end
describe Inventory do
end
describe BlockSpec do
end
describe Transaction do
end
describe Block do
end
describe Headers do
end
describe CheckOrder do
end
describe SubmitOrder do
end
describe Reply do
end
describe Alert do
end
# Messages
describe MessageHdr do
end
describe Message do
end
end