Skip to content

Commit

Permalink
Merge pull request #70 from wemixarchive/v0.10.6
Browse files Browse the repository at this point in the history
Merge v0.10.6
  • Loading branch information
cp-jhjin authored Dec 22, 2023
2 parents b4dab75 + ce57fc3 commit 5eae3f1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func (api *DebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error) {
if blockNr == rpc.LatestBlockNumber {
block = api.eth.blockchain.CurrentBlock()
} else if blockNr == rpc.FinalizedBlockNumber {
block = api.eth.blockchain.CurrentFinalizedBlock()
block = api.eth.blockchain.CurrentBlock()
} else if blockNr == rpc.SafeBlockNumber {
block = api.eth.blockchain.CurrentSafeBlock()
} else {
Expand Down Expand Up @@ -418,7 +418,7 @@ func (api *DebugAPI) AccountRange(blockNrOrHash rpc.BlockNumberOrHash, start hex
if number == rpc.LatestBlockNumber {
block = api.eth.blockchain.CurrentBlock()
} else if number == rpc.FinalizedBlockNumber {
block = api.eth.blockchain.CurrentFinalizedBlock()
block = api.eth.blockchain.CurrentBlock()
} else if number == rpc.SafeBlockNumber {
block = api.eth.blockchain.CurrentSafeBlock()
} else {
Expand Down
8 changes: 2 additions & 6 deletions eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ func (b *EthAPIBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumb
return b.eth.blockchain.CurrentBlock().Header(), nil
}
if number == rpc.FinalizedBlockNumber {
block := b.eth.blockchain.CurrentFinalizedBlock()
if block != nil {
return block.Header(), nil
}
return nil, errors.New("finalized block not found")
return b.eth.blockchain.CurrentBlock().Header(), nil
}
if number == rpc.SafeBlockNumber {
block := b.eth.blockchain.CurrentSafeBlock()
Expand Down Expand Up @@ -123,7 +119,7 @@ func (b *EthAPIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumbe
return b.eth.blockchain.CurrentBlock(), nil
}
if number == rpc.FinalizedBlockNumber {
return b.eth.blockchain.CurrentFinalizedBlock(), nil
return b.eth.blockchain.CurrentBlock(), nil
}
if number == rpc.SafeBlockNumber {
return b.eth.blockchain.CurrentSafeBlock(), nil
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
const (
VersionMajor = 0 // Major version component of the current release
VersionMinor = 10 // Minor version component of the current release
VersionPatch = 5 // Patch version component of the current release
VersionPatch = 6 // Patch version component of the current release
VersionMeta = "stable" // Version metadata to append to the version string
)

Expand Down
6 changes: 4 additions & 2 deletions wemix/scripts/gwemix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,16 @@ function start ()
[ "$MAX_TXS_PER_BLOCK" = "" ] || OPTS="${OPTS} --maxtxsperblock ${MAX_TXS_PER_BLOCK}"

[ -d "$d/logs" ] || mkdir -p $d/logs
[ "$LOG_FILESIZE" = "" ] && LOG_FILESIZE="10M"
[ "$LOG_FILECOUNT" = "" ] && LOG_FILECOUNT="5"

cd $d
if [ ! "$2" = "inner" ]; then
$GWEMIX --datadir ${PWD} --metrics $OPTS 2>&1 | \
${d}/bin/logrot ${d}/logs/log 10M 5 &
${d}/bin/logrot ${d}/logs/log ${LOG_FILESIZE} ${LOG_FILECOUNT} &
else
if [ -x "$d/bin/logrot" ]; then
exec > >($d/bin/logrot $d/logs/log 10M 5)
exec > >($d/bin/logrot $d/logs/log ${LOG_FILESIZE} ${LOG_FILECOUNT})
exec 2>&1
fi
exec $GWEMIX --datadir ${PWD} --metrics $OPTS
Expand Down

0 comments on commit 5eae3f1

Please sign in to comment.