Skip to content

Commit 79460e4

Browse files
authored
all: fix whitespace error of golangci-lint, remove extra empty lines (XinFinOrg#1624)
1 parent 9f14aeb commit 79460e4

File tree

13 files changed

+0
-20
lines changed

13 files changed

+0
-20
lines changed

XDCxDAO/mongodb.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ func (db *MongoDatabase) HasObject(hash common.Hash, val interface{}) (bool, err
160160
}
161161

162162
func (db *MongoDatabase) GetObject(hash common.Hash, val interface{}) (interface{}, error) {
163-
164163
if db.IsEmptyKey(hash.Bytes()) {
165164
return nil, nil
166165
}

XDCxlending/lendingstate/managed_state.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ func (ms *LendingManagedState) getAccount(addr common.Hash) *exchanges {
129129
if so != nil && uint64(len(account.nonces))+account.nstart < so.Nonce() {
130130
ms.lenddinges[addr] = newAccount(so)
131131
}
132-
133132
}
134-
135133
return ms.lenddinges[addr]
136134
}
137135

consensus/XDPoS/engines/engine_v2/timeout.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ func (x *XDPoS_v2) onTimeoutPoolThresholdReached(blockChainReader consensus.Chai
115115
}
116116

117117
func (x *XDPoS_v2) getTCEpochInfo(chain consensus.ChainReader, timeoutCert *types.TimeoutCert) (*types.EpochSwitchInfo, error) {
118-
119118
epochSwitchInfo, err := x.getEpochSwitchInfo(chain, (chain.CurrentHeader()), (chain.CurrentHeader()).Hash())
120119
if err != nil {
121120
log.Error("[getTCEpochInfo] Error when getting epoch switch info", "error", err)

consensus/XDPoS/engines/engine_v2/utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ func (x *XDPoS_v2) verifyMsgSignature(signedHashToBeVerified common.Hash, signat
126126
}
127127

128128
func (x *XDPoS_v2) getExtraFields(header *types.Header) (*types.QuorumCert, types.Round, []common.Address, error) {
129-
130129
var masternodes []common.Address
131130

132131
// last v1 block

consensus/tests/engine_v1_tests/block_signer_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ func TestNotChangeSingerListIfNothingProposedOrVoted(t *testing.T) {
9494

9595
// Should call updateM1 at gap block, and update the snapshot if there are SM transactions involved
9696
func TestUpdateSignerListIfVotedBeforeGap(t *testing.T) {
97-
9897
blockchain, backend, parentBlock, signer, signFn := PrepareXDCTestBlockChain(t, GAP-2, params.TestXDPoSMockChainConfig)
9998
// Insert first Block 449
10099
t.Logf("Inserting block with propose at 449...")
@@ -168,7 +167,6 @@ func TestUpdateSignerListIfVotedBeforeGap(t *testing.T) {
168167

169168
// Should call updateM1 before gap block, and update the snapshot if there are SM transactions involved
170169
func TestCallUpdateM1WithSmartContractTranscation(t *testing.T) {
171-
172170
blockchain, backend, currentBlock, signer, signFn := PrepareXDCTestBlockChain(t, GAP-1, params.TestXDPoSMockChainConfig)
173171
// Insert first Block 450 A
174172
t.Logf("Inserting block with propose at 450 A...")
@@ -205,7 +203,6 @@ func TestCallUpdateM1WithSmartContractTranscation(t *testing.T) {
205203

206204
// Should call updateM1 and update snapshot when a forked block(at gap block number) is inserted back into main chain (Edge case)
207205
func TestCallUpdateM1WhenForkedBlockBackToMainChain(t *testing.T) {
208-
209206
blockchain, backend, currentBlock, signer, signFn := PrepareXDCTestBlockChain(t, GAP-1, params.TestXDPoSMockChainConfig)
210207
// Check initial signer, by default, acc3 is in the signerList
211208
signers, err := GetSnapshotSigner(blockchain, blockchain.CurrentBlock().Header())
@@ -356,9 +353,7 @@ func TestCallUpdateM1WhenForkedBlockBackToMainChain(t *testing.T) {
356353
}
357354

358355
func TestStatesShouldBeUpdatedWhenForkedBlockBecameMainChainAtGapBlock(t *testing.T) {
359-
360356
blockchain, backend, parentBlock, signer, signFn := PrepareXDCTestBlockChain(t, GAP-1, params.TestXDPoSMockChainConfig)
361-
362357
state, err := blockchain.State()
363358
if err != nil {
364359
t.Fatalf("Failed while trying to get blockchain state")

consensus/tests/engine_v1_tests/blockchain_race_condition_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ import (
1212

1313
// Snapshot try to read before blockchain is written
1414
func TestRaceConditionOnBlockchainReadAndWrite(t *testing.T) {
15-
1615
blockchain, backend, parentBlock, signer, signFn := PrepareXDCTestBlockChain(t, GAP-1, params.TestXDPoSMockChainConfig)
17-
1816
state, err := blockchain.State()
1917
if err != nil {
2018
t.Fatalf("Failed while trying to get blockchain state")

consensus/tests/engine_v2_tests/helper.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ func voteTX(gasLimit uint64, nonce uint64, addr string) (*types.Transaction, err
122122
}
123123

124124
func getCommonBackend(t *testing.T, chainConfig *params.ChainConfig) *backends.SimulatedBackend {
125-
126125
// initial helper backend
127126
contractBackendForSC := backends.NewXDCSimulatedBackend(types.GenesisAlloc{
128127
voterAddr: {Balance: new(big.Int).SetUint64(10000000000)},

core/vm/privacy/bulletproof.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,6 @@ func NewECPrimeGroupKey(n int) CryptoParams {
12921292
//fmt.Println("Got that U value")
12931293
} else if confirmed == 2*n+1 {
12941294
cg = ECPoint{gen2.X(), gen2.Y()}
1295-
12961295
} else if confirmed == 2*n+2 {
12971296
ch = ECPoint{gen2.X(), gen2.Y()}
12981297
} else {

core/vm/privacy/bulletproof_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ func TestInnerProductProveLen64Rand(t *testing.T) {
146146
t.Error("Inner Product Proof incorrect")
147147
fmt.Printf("Values Used: \n\ta = %s\n\tb = %s\n", a, b)
148148
}
149-
150149
}
151150

152151
func TestInnerProductVerifyFastLen1(t *testing.T) {

core/vm/privacy/ringct_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ func TestSign(t *testing.T) {
5050
if !verified {
5151
t.Error("Failed to verify Ring signature")
5252
}
53-
5453
}
5554

5655
func TestDeserialize(t *testing.T) {

0 commit comments

Comments
 (0)