Skip to content

Commit

Permalink
fix: SpendTx, OracleRegisterTx RLP() methods should always use utils.…
Browse files Browse the repository at this point in the history
…BigInt.Int while serializing, not the utils.BigInt directly, because otherwise there will be a list within a list
  • Loading branch information
randomshinichi committed Mar 23, 2019
1 parent e21c6f5 commit fcaa28d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions aeternity/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,14 @@ func (t SpendTx) RLP() (rlpRawMsg []byte, err error) {
if err != nil {
return
}
amountBytes := t.amount.Bytes()
fmt.Print(amountBytes)
// create the transaction
rlpRawMsg, err = buildRLPMessage(
ObjectTagSpendTransaction,
rlpMessageVersion,
sID,
rID,
t.amount,
t.fee,
t.amount.Int,
t.fee.Int,
t.ttl,
t.nonce,
[]byte(t.payload))
Expand Down Expand Up @@ -273,7 +271,6 @@ func (t OracleRegisterTx) RLP() (rlpRawMsg []byte, err error) {
if err != nil {
return
}
qBytes := t.queryFee.Bytes()
// create the transaction
rlpRawMsg, err = buildRLPMessage(
ObjectTagOracleRegisterTransaction,
Expand All @@ -282,10 +279,10 @@ func (t OracleRegisterTx) RLP() (rlpRawMsg []byte, err error) {
t.accountNonce,
[]byte(t.querySpec),
[]byte(t.responseSpec),
qBytes,
t.queryFee.Int,
t.oracleTTLType,
t.oracleTTLValue,
t.txFee.Bytes(),
t.txFee.Int,
t.txTTL,
t.abiVersion)
return
Expand Down

0 comments on commit fcaa28d

Please sign in to comment.