Skip to content

Commit

Permalink
Merge pull request #1474 from brilliant-lx/fix_waitgroup_master
Browse files Browse the repository at this point in the history
release: prepare for release v1.1.23
  • Loading branch information
brilliant-lx authored Apr 17, 2023
2 parents 82e38f6 + dbe1f20 commit 48aaee6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## v1.1.23
BUGFIX
* [\#1464](https://github.com/bnb-chain/bsc/pull/1464) fix: panic on using WaitGroup after it is freed

## v1.1.22
FEATURE
* [\#1361](https://github.com/bnb-chain/bsc/pull/1361) cmd/faucet: merge ipfaucet2 branch to develop
Expand Down
6 changes: 4 additions & 2 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1546,18 +1546,20 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.
}
}
// Garbage collect anything below our required write retention
wg2 := sync.WaitGroup{}
for !bc.triegc.Empty() {
root, number := bc.triegc.Pop()
if uint64(-number) > chosen {
bc.triegc.Push(root, number)
break
}
wg.Add(1)
wg2.Add(1)
go func() {
triedb.Dereference(root.(common.Hash))
wg.Done()
wg2.Done()
}()
}
wg2.Wait()
}
}
return 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 = 1 // Major version component of the current release
VersionMinor = 1 // Minor version component of the current release
VersionPatch = 22 // Patch version component of the current release
VersionPatch = 23 // Patch version component of the current release
VersionMeta = "" // Version metadata to append to the version string
)

Expand Down

0 comments on commit 48aaee6

Please sign in to comment.