-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/EN-2131-Broadcast-shard-block-which-is-not-notarized-in-metachain (
#169) * Fixed problem when early received messages (before initialization of current round) from a proposer (Header & Body) were not executed * Removed duplicate code by extracting it in one method * Added some print info * Fixed test * Improved GetUnnotarisedHeaders method * Added guard condition * Broadcast only finals blocks to metachain * Changed some print info * Refactored + fixed nil check for header * Fixed integration tests * Fixed type assertion with nil bug * Changed maxThreads accepted in OS from 10k to 100k * Fixed after code review * Extracted duplicate code in a common file * Removed unused code * Refactor some methods name * Fixed print messages * Throtled txs from GenerateAndSendBulkTransactions method * Improved throtled txs from GenerateAndSendBulkTransactions method * Fixed after code review * Added error as additional return parameter to some methods to be able to check the result before call other methods with these values (nil bot not nil) * Fixed return nil instead err and added new check
- Loading branch information
1 parent
dc8ee21
commit ef81f31
Showing
58 changed files
with
1,984 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package mock | ||
|
||
import ( | ||
"github.com/ElrondNetwork/elrond-go-sandbox/data" | ||
) | ||
|
||
type BlocksTrackerMock struct { | ||
UnnotarisedBlocksCalled func() []data.HeaderHandler | ||
RemoveNotarisedBlocksCalled func(headerHandler data.HeaderHandler) error | ||
AddBlockCalled func(headerHandler data.HeaderHandler) | ||
SetBlockBroadcastRoundCalled func(nonce uint64, round int32) | ||
BlockBroadcastRoundCalled func(nonce uint64) int32 | ||
} | ||
|
||
func (btm *BlocksTrackerMock) UnnotarisedBlocks() []data.HeaderHandler { | ||
return btm.UnnotarisedBlocksCalled() | ||
} | ||
|
||
func (btm *BlocksTrackerMock) RemoveNotarisedBlocks(headerHandler data.HeaderHandler) error { | ||
return btm.RemoveNotarisedBlocksCalled(headerHandler) | ||
} | ||
|
||
func (btm *BlocksTrackerMock) AddBlock(headerHandler data.HeaderHandler) { | ||
btm.AddBlockCalled(headerHandler) | ||
} | ||
|
||
func (btm *BlocksTrackerMock) SetBlockBroadcastRound(nonce uint64, round int32) { | ||
btm.SetBlockBroadcastRoundCalled(nonce, round) | ||
} | ||
|
||
func (btm *BlocksTrackerMock) BlockBroadcastRound(nonce uint64) int32 { | ||
return btm.BlockBroadcastRoundCalled(nonce) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.