Merge pull request #263 from nguyenbatam/update_gas_limit_for_Tx_randomize

reduce gas limit for Tx randomize
This commit is contained in:
Tuna 2018-11-08 04:52:52 +01:00 committed by GitHub
commit 884bb19303
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -175,7 +175,7 @@ func BuildTxSecretRandomize(nonce uint64, randomizeAddr common.Address, epocNumb
encryptSecret := Encrypt(randomizeKey, new(big.Int).SetInt64(secret).String()) encryptSecret := Encrypt(randomizeKey, new(big.Int).SetInt64(secret).String())
inputData = append(inputData, common.LeftPadBytes([]byte(encryptSecret), int(sizeOfArray))...) inputData = append(inputData, common.LeftPadBytes([]byte(encryptSecret), int(sizeOfArray))...)
} }
tx := types.NewTransaction(nonce, randomizeAddr, big.NewInt(0), 4200000, big.NewInt(0), inputData) tx := types.NewTransaction(nonce, randomizeAddr, big.NewInt(0), 200000, big.NewInt(0), inputData)
return tx, nil return tx, nil
} }
@ -184,7 +184,7 @@ func BuildTxSecretRandomize(nonce uint64, randomizeAddr common.Address, epocNumb
func BuildTxOpeningRandomize(nonce uint64, randomizeAddr common.Address, randomizeKey []byte) (*types.Transaction, error) { func BuildTxOpeningRandomize(nonce uint64, randomizeAddr common.Address, randomizeKey []byte) (*types.Transaction, error) {
data := common.Hex2Bytes(common.HexSetOpening) data := common.Hex2Bytes(common.HexSetOpening)
inputData := append(data, randomizeKey...) inputData := append(data, randomizeKey...)
tx := types.NewTransaction(nonce, randomizeAddr, big.NewInt(0), 4200000, big.NewInt(0), inputData) tx := types.NewTransaction(nonce, randomizeAddr, big.NewInt(0), 200000, big.NewInt(0), inputData)
return tx, nil return tx, nil
} }