|
|
@ -100,6 +100,7 @@ ByteBuffer& Bitcoin::operator>>(ByteBuffer& a, TxOut& b) |
|
|
|
ByteBuffer& Bitcoin::operator<<(ByteBuffer& a, Transaction& b) |
|
|
|
ByteBuffer& Bitcoin::operator<<(ByteBuffer& a, Transaction& b) |
|
|
|
{ |
|
|
|
{ |
|
|
|
a << b.version; |
|
|
|
a << b.version; |
|
|
|
|
|
|
|
a << b.time; |
|
|
|
|
|
|
|
|
|
|
|
// Inputs
|
|
|
|
// Inputs
|
|
|
|
VarInt insize(b.in.size()); |
|
|
|
VarInt insize(b.in.size()); |
|
|
@ -120,6 +121,7 @@ ByteBuffer& Bitcoin::operator<<(ByteBuffer& a, Transaction& b) |
|
|
|
ByteBuffer& Bitcoin::operator>>(ByteBuffer& a, Transaction& b) |
|
|
|
ByteBuffer& Bitcoin::operator>>(ByteBuffer& a, Transaction& b) |
|
|
|
{ |
|
|
|
{ |
|
|
|
a >> b.version; |
|
|
|
a >> b.version; |
|
|
|
|
|
|
|
a >> b.time; |
|
|
|
|
|
|
|
|
|
|
|
// Inputs
|
|
|
|
// Inputs
|
|
|
|
VarInt insize; |
|
|
|
VarInt insize; |
|
|
@ -158,6 +160,8 @@ ByteBuffer& Bitcoin::operator<<(ByteBuffer& a, Block& b) |
|
|
|
for (uint64 i = 0; i < txcount; ++i) |
|
|
|
for (uint64 i = 0; i < txcount; ++i) |
|
|
|
a << b.tx[i]; |
|
|
|
a << b.tx[i]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
a << b.signature; |
|
|
|
|
|
|
|
|
|
|
|
return a; |
|
|
|
return a; |
|
|
|
} |
|
|
|
} |
|
|
|
ByteBuffer& Bitcoin::operator>>(ByteBuffer& a, Block& b) |
|
|
|
ByteBuffer& Bitcoin::operator>>(ByteBuffer& a, Block& b) |
|
|
@ -176,5 +180,7 @@ ByteBuffer& Bitcoin::operator>>(ByteBuffer& a, Block& b) |
|
|
|
for (uint64 i = 0; i < txcount; ++i) |
|
|
|
for (uint64 i = 0; i < txcount; ++i) |
|
|
|
a >> b.tx[i]; |
|
|
|
a >> b.tx[i]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
a >> b.signature; |
|
|
|
|
|
|
|
|
|
|
|
return a; |
|
|
|
return a; |
|
|
|
} |
|
|
|
} |
|
|
|