Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dot/sync): Gossip BlockAnnounceMessage only after successfully imported #2885

Merged
merged 18 commits into from
Oct 21, 2022
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3c2a92f
fix: gossip block announce only after block sucessfully imported
EclesioMeloJunior Oct 10, 2022
069109b
chore: imported block could be a best block
EclesioMeloJunior Oct 10, 2022
b3c1cea
chore: fix lint warns
EclesioMeloJunior Oct 11, 2022
f9c0d52
chore: simplify bool var, remove unneeded comment
EclesioMeloJunior Oct 11, 2022
abf6330
Merge branch 'development' into eclesio/fix/import-block-announce
EclesioMeloJunior Oct 11, 2022
67b3710
Merge branch 'eclesio/fix/import-block-announce' of github.com:ChainS…
EclesioMeloJunior Oct 11, 2022
35b18ff
wip: maybe propagate message when we have the block
EclesioMeloJunior Oct 11, 2022
efbf67f
Merge branch 'development' into eclesio/fix/import-block-announce
EclesioMeloJunior Oct 12, 2022
48fcdf6
chore: change test to check `propagate` var is `false`
EclesioMeloJunior Oct 13, 2022
80c8616
chore: increase code coverage + fix tests
EclesioMeloJunior Oct 13, 2022
642b847
chore: fix lint warns
EclesioMeloJunior Oct 13, 2022
a539478
chore: solving error wrapping
EclesioMeloJunior Oct 13, 2022
6eea08b
chore: remove useless comment
EclesioMeloJunior Oct 14, 2022
7cccaf9
chore: address comment
EclesioMeloJunior Oct 18, 2022
2615216
Merge branch 'development' into eclesio/fix/import-block-announce
EclesioMeloJunior Oct 20, 2022
1cde08c
chore: fix inverted `errors.Is` check
EclesioMeloJunior Oct 20, 2022
5b004be
chore
EclesioMeloJunior Oct 21, 2022
b04ed3b
Merge branch 'development' into eclesio/fix/import-block-announce
EclesioMeloJunior Oct 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: fix lint warns
EclesioMeloJunior committed Oct 11, 2022
commit b3c1ceaf293c35e792285c83cd29d723aef12acb
3 changes: 2 additions & 1 deletion dot/core/service.go
Original file line number Diff line number Diff line change
@@ -167,7 +167,8 @@ func (s *Service) HandleBlockProduced(block *types.Block, state *rtstorage.TrieS
return nil
}

func createBlockAnnounce(block *types.Block, isBestBlock bool) (blockAnnounce *network.BlockAnnounceMessage, err error) {
func createBlockAnnounce(block *types.Block, isBestBlock bool) (
blockAnnounce *network.BlockAnnounceMessage, err error) {
digest := types.NewDigest()
for i := range block.Header.Digest.Types {
digestValue, err := block.Header.Digest.Types[i].Value()