|
|
@ -33,9 +33,9 @@ Transaction::Transaction(bytesConstRef _rlpData) |
|
|
|
receiveAddress = rlp[1].toHash<Address>(); |
|
|
|
value = rlp[2].toInt<u256>(); |
|
|
|
data.reserve(rlp[3].itemCountStrict()); |
|
|
|
for (auto const& i: rlp[4]) |
|
|
|
for (auto const& i: rlp[3]) |
|
|
|
data.push_back(i.toInt<u256>()); |
|
|
|
vrs = Signature{ rlp[5].toInt<byte>(), rlp[6].toInt<u256>(), rlp[7].toInt<u256>() }; |
|
|
|
vrs = Signature{ rlp[4].toInt<byte>(), rlp[5].toInt<u256>(), rlp[6].toInt<u256>() }; |
|
|
|
} |
|
|
|
|
|
|
|
Address Transaction::sender() const |
|
|
@ -90,7 +90,7 @@ void Transaction::sign(Secret _priv) |
|
|
|
|
|
|
|
void Transaction::fillStream(RLPStream& _s, bool _sig) const |
|
|
|
{ |
|
|
|
_s.appendList(_sig ? 8 : 5); |
|
|
|
_s.appendList(_sig ? 7 : 4); |
|
|
|
_s << nonce << receiveAddress << value << data; |
|
|
|
if (_sig) |
|
|
|
_s << vrs.v << vrs.r << vrs.s; |
|
|
|