Remove label and insert full version

This commit is contained in:
Alexey Akhunov 2019-05-28 13:26:05 +01:00
parent 23594cecbd
commit 696604cf7f

View file

@ -477,9 +477,11 @@ 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 {
break
}
m := api.txMap[address] m := api.txMap[address]
for nonce := statedb.GetNonce(address); ; nonce++ { for nonce := statedb.GetNonce(address); ; nonce++ {
if tx, ok := m[nonce]; ok { if tx, ok := m[nonce]; ok {
@ -497,7 +499,7 @@ func (api *RetestethAPI) mineBlock() error {
) )
if err != nil { if err != nil {
statedb.RevertToSnapshot(snap) statedb.RevertToSnapshot(snap)
continue outer break
} }
txs = append(txs, tx) txs = append(txs, tx)
receipts = append(receipts, receipt) receipts = append(receipts, receipt)
@ -510,14 +512,13 @@ func (api *RetestethAPI) mineBlock() error {
} }
txCount++ txCount++
if gasPool.Gas() < params.TxGas { if gasPool.Gas() < params.TxGas {
break outer blockFull = true
} }
} else { } else {
break // Gap in the nonces break // Gap in the nonces
} }
} }
} }
}
api.engine.rewardsOn = false api.engine.rewardsOn = false
block, err := api.engine.FinalizeAndAssemble(api.blockchain, header, statedb, txs, []*types.Header{}, receipts) block, err := api.engine.FinalizeAndAssemble(api.blockchain, header, statedb, txs, []*types.Header{}, receipts)
return api.importBlock(block) return api.importBlock(block)
@ -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