Skip to content

Conversation

@zhiqiangxu
Copy link
Contributor

The fix is straight forward, following is some compatible analysis about why it's safe to apply the fix.

VbftBlockInfo.Proposer is only ever retrieved(immutable referenced) by :

func (blk *Block) getProposer() uint32 {
	return blk.Info.Proposer
}

blk.Info is only ever mutated by:

BlockPool.setBlockSealed,Server.constructProposalMsg,Block.Deserialize:

All of them will only set blk.Info to the non-empty one.

initVbftBlock:

This is only called after a block is sealed, so doesn't affect consensus.

laizy and others added 15 commits August 5, 2020 10:25
* implement offline witness in p2p

* refactor local rpc

* add rpc api

* add license

* fix comments

* check self is gov node before vote
* remove old gov node ip from members in subnet

* fix testcase
* Drop duplicate import

* Drop redundant return and break statement

* for true ==> for

* Fix bool cmp lint

should omit comparison to bool constant

* use or drop unused variables

* Drop empty branch

* Some fmt.Sprintf is useless, drop it

* should call self.quitWg.Add(1) before starting the goroutine to avoid a race

* drop for, using append

* Update cmd/tx_cmd.go

* Update consensus/vbft/node_sync.go

Co-authored-by: laizy <laizy@users.noreply.github.com>
@laizy laizy force-pushed the master branch 2 times, most recently from 8c8ee59 to dc599e9 Compare July 6, 2021 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants