Now we're getting somewhere. First test written and passed.
This commit is contained in:
@@ -5,13 +5,18 @@ require 'btc_wire_proto'
|
||||
|
||||
SERVICE_MASK = "\x00\x00\x00\x01" # Sets NODE_NETWORK
|
||||
|
||||
include ::BtcWireProto
|
||||
|
||||
describe ::BtcWireProto do
|
||||
|
||||
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
|
||||
s = ServicesMask::read("\x00" * 8) # All 64 bits unset
|
||||
s.node_network.should == 0
|
||||
|
||||
s = ServicesMask::read("\x00" * 7 + "\x01")
|
||||
s.node_network.should == 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,7 +36,7 @@ describe BtcWireProto do
|
||||
end
|
||||
describe TransactionOut do
|
||||
end
|
||||
describe BlockHeader do
|
||||
describe BlockHdr do
|
||||
end
|
||||
|
||||
# Payloads
|
||||
|
Reference in New Issue
Block a user