mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Remove label and insert full version
This commit is contained in:
parent
23594cecbd
commit
696604cf7f
1 changed files with 38 additions and 37 deletions
|
|
@ -477,44 +477,45 @@ func (api *RetestethAPI) mineBlock() error {
|
||||||
var txs []*types.Transaction
|
var txs []*types.Transaction
|
||||||
var receipts []*types.Receipt
|
var receipts []*types.Receipt
|
||||||
var coalescedLogs []*types.Log
|
var coalescedLogs []*types.Log
|
||||||
if gasPool.Gas() >= params.TxGas {
|
var blockFull = gasPool.Gas() < params.TxGas
|
||||||
outer:
|
for address := range api.txSenders {
|
||||||
for address := range api.txSenders {
|
if blockFull {
|
||||||
m := api.txMap[address]
|
break
|
||||||
for nonce := statedb.GetNonce(address); ; nonce++ {
|
}
|
||||||
if tx, ok := m[nonce]; ok {
|
m := api.txMap[address]
|
||||||
// Try to apply transactions to the state
|
for nonce := statedb.GetNonce(address); ; nonce++ {
|
||||||
statedb.Prepare(tx.Hash(), common.Hash{}, txCount)
|
if tx, ok := m[nonce]; ok {
|
||||||
snap := statedb.Snapshot()
|
// Try to apply transactions to the state
|
||||||
|
statedb.Prepare(tx.Hash(), common.Hash{}, txCount)
|
||||||
|
snap := statedb.Snapshot()
|
||||||
|
|
||||||
receipt, _, err := core.ApplyTransaction(
|
receipt, _, err := core.ApplyTransaction(
|
||||||
api.chainConfig,
|
api.chainConfig,
|
||||||
api.blockchain,
|
api.blockchain,
|
||||||
&api.author,
|
&api.author,
|
||||||
gasPool,
|
gasPool,
|
||||||
statedb,
|
statedb,
|
||||||
header, tx, &header.GasUsed, *api.blockchain.GetVMConfig(),
|
header, tx, &header.GasUsed, *api.blockchain.GetVMConfig(),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
statedb.RevertToSnapshot(snap)
|
statedb.RevertToSnapshot(snap)
|
||||||
continue outer
|
break
|
||||||
}
|
|
||||||
txs = append(txs, tx)
|
|
||||||
receipts = append(receipts, receipt)
|
|
||||||
coalescedLogs = append(coalescedLogs, receipt.Logs...)
|
|
||||||
delete(m, nonce)
|
|
||||||
if len(m) == 0 {
|
|
||||||
// Last tx for the sender
|
|
||||||
delete(api.txMap, address)
|
|
||||||
delete(api.txSenders, address)
|
|
||||||
}
|
|
||||||
txCount++
|
|
||||||
if gasPool.Gas() < params.TxGas {
|
|
||||||
break outer
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
break // Gap in the nonces
|
|
||||||
}
|
}
|
||||||
|
txs = append(txs, tx)
|
||||||
|
receipts = append(receipts, receipt)
|
||||||
|
coalescedLogs = append(coalescedLogs, receipt.Logs...)
|
||||||
|
delete(m, nonce)
|
||||||
|
if len(m) == 0 {
|
||||||
|
// Last tx for the sender
|
||||||
|
delete(api.txMap, address)
|
||||||
|
delete(api.txSenders, address)
|
||||||
|
}
|
||||||
|
txCount++
|
||||||
|
if gasPool.Gas() < params.TxGas {
|
||||||
|
blockFull = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
break // Gap in the nonces
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -804,7 +805,7 @@ func (api *RetestethAPI) StorageRangeAt(ctx context.Context,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *RetestethAPI) ClientVersion(ctx context.Context) (string, error) {
|
func (api *RetestethAPI) ClientVersion(ctx context.Context) (string, error) {
|
||||||
return "Geth/1.8.0", nil
|
return "Geth-" + params.VersionWithCommit(gitCommit, gitDate), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// splitAndTrim splits input separated by a comma
|
// splitAndTrim splits input separated by a comma
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue