mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
it workssss
This commit is contained in:
parent
2ef8510ba6
commit
973afda8b1
3 changed files with 5 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
rm -rf ../newcoin_data
|
||||
mkdir ../newcoin_data
|
||||
./build/bin/geth init --datadir ../newcoin_data/ genesis.json
|
||||
./build/bin/geth --datadir ../newcoin_data --rpc --rpcapi txpool --rpcport 8545 --mine --miner.threads=1 --etherbase=0x4d058e24aEC4d7Ce5341641931c73936F313862D console
|
||||
./build/bin/geth --datadir ../newcoin_data --rpc --rpcport 8545 --mine --miner.threads=1 --etherbase=0x4d058e24aEC4d7Ce5341641931c73936F313862D console
|
||||
|
||||
|
|
|
|||
|
|
@ -274,9 +274,10 @@ func (st *StateTransition) refundGas() {
|
|||
// Return ETH for remaining gas, exchanged at the original rate.
|
||||
remaining := new(big.Int).Mul(new(big.Int).SetUint64(st.gas), st.gasPrice)
|
||||
|
||||
if(len(msg.Payer)!= 0) {
|
||||
payer := msg.Payer()
|
||||
if(len(st.msg.Payer())!= 0) {
|
||||
payer := st.msg.Payer()
|
||||
payerAddress := common.BytesToAddress(crypto.Keccak256(payer)[12:])
|
||||
st.state.AddBalance(payerAddress, remaining)
|
||||
} else {
|
||||
st.state.AddBalance(st.msg.From(), remaining)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
)
|
||||
|
||||
// emptyCodeHash is used by create to ensure deployment is disallowed to already
|
||||
|
|
|
|||
Loading…
Reference in a new issue