Pay data gases (#633)

pull/636/head
Eugene Kim 6 years ago
parent 702d7986b4
commit c063a6c50a
  1. 13
      cmd/client/wallet/main.go

@ -345,7 +345,18 @@ func processTransferCommand() {
amountBigInt := big.NewInt(int64(amount * params.GWei))
amountBigInt = amountBigInt.Mul(amountBigInt, big.NewInt(params.GWei))
tx, _ := types.SignTx(types.NewTransaction(state.nonce, receiverAddress, uint32(shardID), amountBigInt, params.TxGas, nil, inputData), types.HomesteadSigner{}, senderPriKey)
gas := params.TxGas
for b := range inputData {
if b != 0 {
gas += params.TxDataNonZeroGas
} else {
gas += params.TxDataZeroGas
}
}
tx := types.NewTransaction(
state.nonce, receiverAddress, uint32(shardID), amountBigInt,
gas, nil, inputData)
tx, _ = types.SignTx(tx, types.HomesteadSigner{}, senderPriKey)
submitTransaction(tx, walletNode, uint32(shardID))
}

Loading…
Cancel
Save