all: remove extra empty lines (#1574)

This commit is contained in:
wit liu 2025-10-08 12:25:10 +08:00 committed by GitHub
parent 3f0f3af776
commit f709ef2edb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 0 additions and 15 deletions

View file

@ -205,7 +205,6 @@ func (o *OrderItem) VerifyOrder(state *state.StateDB) error {
// VerifyBasicOrderInfo verify basic info
func (o *OrderItem) VerifyBasicOrderInfo() error {
if o.Status == OrderNew {
if o.Type == Limit {
if err := o.verifyPrice(); err != nil {
@ -271,7 +270,6 @@ func (o *OrderItem) verifyOrderType() error {
// verify order side
func (o *OrderItem) verifyOrderSide() error {
if o.Side != Bid && o.Side != Ask {
log.Debug("Invalid orderSide", "side", o.Side)
return ErrInvalidOrderSide
@ -392,7 +390,6 @@ func (s *Signature) MarshalSignature() ([]byte, error) {
// Verify returns the address that corresponds to the given signature and signed message
func (s *Signature) Verify(hash common.Hash) (common.Address, error) {
hashBytes := hash.Bytes()
sigBytes, err := s.MarshalSignature()
if err != nil {

View file

@ -1054,7 +1054,6 @@ func (l *Lending) GetCollateralPrices(header *types.Header, chain consensus.Chai
}
func (l *Lending) GetXDCBasePrices(header *types.Header, chain consensus.ChainContext, statedb *state.StateDB, tradingStateDb *tradingstate.TradingStateDB, token common.Address) (*big.Int, error) {
tokenXDCPriceFromContract, updatedBlock := lendingstate.GetCollateralPrice(statedb, token, common.XDCNativeAddressBinary)
tokenXDCPriceUpdatedFromContract := updatedBlock.Uint64()/chain.Config().XDPoS.Epoch == header.Number.Uint64()/chain.Config().XDPoS.Epoch

View file

@ -48,5 +48,4 @@ func main() {
fmt.Println("UpdateFee: Get receipt failed", err)
}
fmt.Println("UpdateFee: Done receipt status", r.Status)
}

View file

@ -621,7 +621,6 @@ func (pool *LendingPool) validateLending(tx *types.LendingTransaction) error {
// validateTx checks whether a transaction is valid according to the consensus
// rules and adheres to some heuristic limits of the local node (price and size).
func (pool *LendingPool) validateTx(tx *types.LendingTransaction, local bool) error {
// check if sender is in black list
if common.IsInBlacklist(tx.From()) {
return fmt.Errorf("reject transaction with sender in black-list: %v", tx.From().Hex())

View file

@ -530,7 +530,6 @@ func (pool *OrderPool) validateOrder(tx *types.OrderTransaction) error {
// validateTx checks whether a transaction is valid according to the consensus
// rules and adheres to some heuristic limits of the local node (price and size).
func (pool *OrderPool) validateTx(tx *types.OrderTransaction, local bool) error {
// check if sender is in black list
if common.IsInBlacklist(tx.From()) {
return fmt.Errorf("reject transaction with sender in black-list: %v", tx.From().Hex())

View file

@ -66,7 +66,6 @@ func AttachConsensusV1Hooks(adaptor *XDPoS.XDPoS, bc *core.BlockChain, chainConf
}
log.Debug("Time Calculated HookPenalty ", "block", blockNumberEpoc, "time", common.PrettyDuration(time.Since(start)))
return penSigners, nil
}
// Hook scans for bad masternodes and decide to penalty them

View file

@ -2088,7 +2088,6 @@ func submitOrderTransaction(ctx context.Context, b Backend, tx *types.OrderTrans
// submitLendingTransaction is a helper function that submits tx to txPool and logs a message.
func submitLendingTransaction(ctx context.Context, b Backend, tx *types.LendingTransaction) (common.Hash, error) {
if err := b.SendLendingTx(ctx, tx); err != nil {
return common.Hash{}, err
}
@ -2098,7 +2097,6 @@ func submitLendingTransaction(ctx context.Context, b Backend, tx *types.LendingT
// SendTransaction creates a transaction for the given argument, sign it and submit it to the
// transaction pool.
func (s *TransactionAPI) SendTransaction(ctx context.Context, args TransactionArgs) (common.Hash, error) {
// Look up the wallet containing the requested signer
account := accounts.Account{Address: args.from()}
@ -2201,7 +2199,6 @@ func (s *PublicXDCXTransactionPoolAPI) GetOrderTxMatchByHash(ctx context.Context
orders = append(orders, order)
}
return orders, nil
}
// GetOrderPoolContent return pending, queued content
@ -2354,7 +2351,6 @@ func (s *PublicXDCXTransactionPoolAPI) SendLending(ctx context.Context, msg Lend
// GetOrderCount returns the number of transactions the given address has sent for the given block number
func (s *PublicXDCXTransactionPoolAPI) GetOrderCount(ctx context.Context, addr common.Address) (*hexutil.Uint64, error) {
nonce, err := s.b.GetOrderNonce(addr.Hash())
if err != nil {
return (*hexutil.Uint64)(&nonce), err

View file

@ -413,7 +413,6 @@ func (h dialHistory) min() pastDial {
}
func (h *dialHistory) add(id discover.NodeID, exp time.Time) {
heap.Push(h, pastDial{id, exp})
}
func (h *dialHistory) remove(id discover.NodeID) bool {
for i, v := range *h {

View file

@ -478,7 +478,6 @@ func (t *expectEvents) expect(events ...*Event) {
}
switch expected.Type {
case EventTypeNode:
if event.Node == nil {
t.Fatal("expected event.Node to be set")

View file

@ -688,7 +688,6 @@ func (net *Network) Load(snap *Snapshot) error {
}
}
for _, conn := range snap.Conns {
if !net.GetNode(conn.One).Up || !net.GetNode(conn.Other).Up {
//in this case, at least one of the nodes of a connection is not up,
//so it would result in the snapshot `Load` to fail