mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Merge branch 'master' of https://github.com/ethereum/go-ethereum
This commit is contained in:
commit
b51ce52e75
3 changed files with 6 additions and 7 deletions
|
|
@ -107,7 +107,7 @@ func (w *wizard) deployNode(boot bool) {
|
||||||
// Ethash based miners only need an etherbase to mine against
|
// Ethash based miners only need an etherbase to mine against
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
if infos.etherbase == "" {
|
if infos.etherbase == "" {
|
||||||
fmt.Printf("What address should the miner user?\n")
|
fmt.Printf("What address should the miner use?\n")
|
||||||
for {
|
for {
|
||||||
if address := w.readAddress(); address != nil {
|
if address := w.readAddress(); address != nil {
|
||||||
infos.etherbase = address.Hex()
|
infos.etherbase = address.Hex()
|
||||||
|
|
@ -115,7 +115,7 @@ func (w *wizard) deployNode(boot bool) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("What address should the miner user? (default = %s)\n", infos.etherbase)
|
fmt.Printf("What address should the miner use? (default = %s)\n", infos.etherbase)
|
||||||
infos.etherbase = w.readDefaultAddress(common.HexToAddress(infos.etherbase)).Hex()
|
infos.etherbase = w.readDefaultAddress(common.HexToAddress(infos.etherbase)).Hex()
|
||||||
}
|
}
|
||||||
} else if w.conf.Genesis.Config.Clique != nil {
|
} else if w.conf.Genesis.Config.Clique != nil {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
|
||||||
// and uses the input parameters for its environment. It returns the receipt
|
// and uses the input parameters for its environment. It returns the receipt
|
||||||
// for the transaction, gas used and an error if the transaction failed,
|
// for the transaction, gas used and an error if the transaction failed,
|
||||||
// indicating the block was invalid.
|
// indicating the block was invalid.
|
||||||
func ApplyTransaction(config *params.ChainConfig, bc *BlockChain, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, cfg vm.Config) (*types.Receipt, uint64, error) {
|
func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, cfg vm.Config) (*types.Receipt, uint64, error) {
|
||||||
msg, err := tx.AsMessage(types.MakeSigner(config, header.Number))
|
msg, err := tx.AsMessage(types.MakeSigner(config, header.Number))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,9 @@ func hexToCompact(hex []byte) []byte {
|
||||||
|
|
||||||
func compactToHex(compact []byte) []byte {
|
func compactToHex(compact []byte) []byte {
|
||||||
base := keybytesToHex(compact)
|
base := keybytesToHex(compact)
|
||||||
base = base[:len(base)-1]
|
// delete terminator flag
|
||||||
// apply terminator flag
|
if base[0] < 2 {
|
||||||
if base[0] >= 2 {
|
base = base[:len(base)-1]
|
||||||
base = append(base, 16)
|
|
||||||
}
|
}
|
||||||
// apply odd flag
|
// apply odd flag
|
||||||
chop := 2 - base[0]&1
|
chop := 2 - base[0]&1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue