Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion cmd/termui/presenter/presenterStatusHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ type PresenterStatusHandler struct {
mutPresenterMap sync.RWMutex
logLines []string
mutLogLineWrite sync.RWMutex
oldRound uint64
synchronizationSpeedHistory []uint64
totalRewardsOld *big.Float
}
Expand Down
7 changes: 2 additions & 5 deletions process/coordinator/processProposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,8 @@ func (tc *transactionCoordinator) getAOTSelection(nonce uint64) ([][]byte, []dat
func (tc *transactionCoordinator) SelectOutgoingTransactions(
nonce uint64,
haveTimeForSelection func() bool,
) (selectedTxHashes [][]byte, selectedPendingIncomingMiniBlocks []data.MiniBlockHeaderHandler) {
selectedTxHashes = make([][]byte, 0)
selectedTxs := make([]data.TransactionHandler, 0)

selectedTxHashes, selectedTxs = tc.getAOTSelection(nonce)
) ([][]byte, []data.MiniBlockHeaderHandler) {
selectedTxHashes, selectedTxs := tc.getAOTSelection(nonce)
// if no tx returned from AOT selection, fallback to regular selection from pre-processors
if len(selectedTxs) == 0 {
for _, blockType := range tc.preProcProposal.keysTxPreProcs {
Expand Down
27 changes: 0 additions & 27 deletions process/sync/baseSync.go
Original file line number Diff line number Diff line change
Expand Up @@ -1964,16 +1964,6 @@ func (boot *baseBootstrap) getHeaderFromPool(hash []byte) (data.HeaderHandler, e
return process.GetShardHeaderFromPool(hash, boot.headers)
}

func (boot *baseBootstrap) getHeaderWithNonce(
nonce uint64,
) (data.HeaderHandler, []byte, error) {
if boot.shardCoordinator.SelfId() == core.MetachainShardId {
return boot.getMetaHeaderWithNonce(nonce)
}

return boot.getShardHeaderWithNonce(nonce)
}

func (boot *baseBootstrap) getMetaHeaderWithNonce(
nonce uint64,
) (data.HeaderHandler, []byte, error) {
Expand All @@ -1990,23 +1980,6 @@ func (boot *baseBootstrap) getMetaHeaderWithNonce(
)
}

func (boot *baseBootstrap) getShardHeaderWithNonce(
nonce uint64,
) (data.HeaderHandler, []byte, error) {
header, hash, err := process.GetShardHeaderFromPoolWithNonce(nonce, boot.shardCoordinator.SelfId(), boot.headers)
if err == nil {
return header, hash, nil
}

return process.GetShardHeaderFromStorageWithNonce(
nonce,
boot.shardCoordinator.SelfId(),
boot.store,
boot.uint64Converter,
boot.marshalizer,
)
}

func (boot *baseBootstrap) getHeaderFromPoolWithNonce(
nonce uint64,
) (data.HeaderHandler, []byte, error) {
Expand Down
3 changes: 1 addition & 2 deletions process/throttle/antiflood/factory/p2pOutputAntiflood.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

"github.com/multiversx/mx-chain-core-go/core/check"

"github.com/multiversx/mx-chain-go/common"
"github.com/multiversx/mx-chain-go/config"
"github.com/multiversx/mx-chain-go/process"
Expand All @@ -14,8 +15,6 @@ import (
"github.com/multiversx/mx-chain-go/storage/storageunit"
)

const outputReservedPercent = float32(0)

// NewP2POutputAntiFlood will return an instance of an output antiflood component based on the config
func NewP2POutputAntiFlood(
ctx context.Context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/multiversx/mx-chain-core-go/core"
"github.com/multiversx/mx-chain-core-go/core/check"

"github.com/multiversx/mx-chain-go/common"
"github.com/multiversx/mx-chain-go/process"
"github.com/multiversx/mx-chain-go/storage"
Expand All @@ -22,10 +23,8 @@ type ArgQuotaFloodPreventer struct {
var _ process.FloodPreventer = (*quotaFloodPreventer)(nil)

const minMessages = 1
const minTotalSize = 1 //1Byte
const minTotalSize = 1 // 1Byte
const initNumMessages = 1
const maxPercentReserved = 90.0
const minPercentReserved = 0.0
const quotaStructSize = 24

type quota struct {
Expand Down Expand Up @@ -143,7 +142,7 @@ func (qfp *quotaFloodPreventer) Reset() {
qfp.resetStatusHandlers()
qfp.createStatistics()

//TODO change this if cacher.Clear() is time consuming
// TODO change this if cacher.Clear() is time consuming
qfp.cacher.Clear()
}

Expand Down
9 changes: 2 additions & 7 deletions trie/branchNode.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import (
"github.com/multiversx/mx-chain-core-go/core/check"
"github.com/multiversx/mx-chain-core-go/hashing"
"github.com/multiversx/mx-chain-core-go/marshal"
vmcommon "github.com/multiversx/mx-chain-vm-common-go"

"github.com/multiversx/mx-chain-go/common"
"github.com/multiversx/mx-chain-go/trie/leavesRetriever/trieNodeData"
Comment thread
AdoAdoAdo marked this conversation as resolved.
vmcommon "github.com/multiversx/mx-chain-vm-common-go"
)

var _ = node(&branchNode{})
Expand Down Expand Up @@ -334,12 +335,6 @@ func (bn *branchNode) commitSnapshot(
return nil
}

func (bn *branchNode) removeChildrenPointers() {
for i := range bn.children {
bn.children[i] = nil
}
}

func (bn *branchNode) getEncodedNode() ([]byte, error) {
err := bn.isEmptyOrNil()
if err != nil {
Expand Down
Loading