mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
all: fix goimports (#1560)
This commit is contained in:
parent
057d840380
commit
9ce02a7010
11 changed files with 17 additions and 11 deletions
|
|
@ -3,7 +3,6 @@ package main
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx/simulation"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
@ -12,6 +11,7 @@ import (
|
||||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx"
|
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx"
|
||||||
|
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx/simulation"
|
||||||
"github.com/XinFinOrg/XDPoSChain/crypto"
|
"github.com/XinFinOrg/XDPoSChain/crypto"
|
||||||
"github.com/XinFinOrg/XDPoSChain/ethclient"
|
"github.com/XinFinOrg/XDPoSChain/ethclient"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
package XDCx
|
package XDCx
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math/big"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx/contract"
|
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx/contract"
|
||||||
"math/big"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type MyTRC21 struct {
|
type MyTRC21 struct {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
package XDCx
|
package XDCx
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math/big"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx/contract"
|
"github.com/XinFinOrg/XDPoSChain/contracts/XDCx/contract"
|
||||||
"math/big"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type TRC21Issuer struct {
|
type TRC21Issuer struct {
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@
|
||||||
package blocksigner
|
package blocksigner
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math/big"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/blocksigner/contract"
|
"github.com/XinFinOrg/XDPoSChain/contracts/blocksigner/contract"
|
||||||
"math/big"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type BlockSigner struct {
|
type BlockSigner struct {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
package simulation
|
package simulation
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/XinFinOrg/XDPoSChain/crypto"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
"github.com/XinFinOrg/XDPoSChain/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
package trc21issuer
|
package trc21issuer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math/big"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/trc21issuer/contract"
|
"github.com/XinFinOrg/XDPoSChain/contracts/trc21issuer/contract"
|
||||||
"math/big"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type MyTRC21 struct {
|
type MyTRC21 struct {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
package trc21issuer
|
package trc21issuer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math/big"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/contracts/trc21issuer/contract"
|
"github.com/XinFinOrg/XDPoSChain/contracts/trc21issuer/contract"
|
||||||
"math/big"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type TRC21Issuer struct {
|
type TRC21Issuer struct {
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ func NewValidator(transactOpts *bind.TransactOpts, contractAddr common.Address,
|
||||||
func DeployValidator(transactOpts *bind.TransactOpts, contractBackend bind.ContractBackend, validatorAddress []common.Address, caps []*big.Int, ownerAddress common.Address, minDeposit *big.Int, minVoterCap *big.Int) (common.Address, *Validator, error) {
|
func DeployValidator(transactOpts *bind.TransactOpts, contractBackend bind.ContractBackend, validatorAddress []common.Address, caps []*big.Int, ownerAddress common.Address, minDeposit *big.Int, minVoterCap *big.Int) (common.Address, *Validator, error) {
|
||||||
if minDeposit == nil {
|
if minDeposit == nil {
|
||||||
minDeposit = new(big.Int)
|
minDeposit = new(big.Int)
|
||||||
minDeposit.SetString("10000000", 10) // 10M
|
minDeposit.SetString("10000000", 10) // 10M
|
||||||
minDeposit.Mul(minDeposit, big.NewInt(1e18)) //convert to wei
|
minDeposit.Mul(minDeposit, big.NewInt(1e18)) //convert to wei
|
||||||
}
|
}
|
||||||
if minVoterCap == nil {
|
if minVoterCap == nil {
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@ package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/rawdb"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/XinFinOrg/XDPoSChain/consensus/ethash"
|
"github.com/XinFinOrg/XDPoSChain/consensus/ethash"
|
||||||
|
"github.com/XinFinOrg/XDPoSChain/core/rawdb"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/types"
|
"github.com/XinFinOrg/XDPoSChain/core/types"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/vm"
|
"github.com/XinFinOrg/XDPoSChain/core/vm"
|
||||||
"github.com/XinFinOrg/XDPoSChain/crypto"
|
"github.com/XinFinOrg/XDPoSChain/crypto"
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ func (b *Bfter) SyncInfo(peer string, syncInfo *types.SyncInfo) error {
|
||||||
log.Debug("[SyncInfo] Received SyncInfo", "qcRound", syncInfo.HighestQuorumCert.ProposedBlockInfo.Round, "qcBlocknum", syncInfo.HighestQuorumCert.ProposedBlockInfo.Number, "qcBlockhash", syncInfo.HighestQuorumCert.ProposedBlockInfo.Hash.Hex())
|
log.Debug("[SyncInfo] Received SyncInfo", "qcRound", syncInfo.HighestQuorumCert.ProposedBlockInfo.Round, "qcBlocknum", syncInfo.HighestQuorumCert.ProposedBlockInfo.Number, "qcBlockhash", syncInfo.HighestQuorumCert.ProposedBlockInfo.Hash.Hex())
|
||||||
}
|
}
|
||||||
if syncInfo.HighestTimeoutCert != nil {
|
if syncInfo.HighestTimeoutCert != nil {
|
||||||
log.Debug("[SyncInfo] Received SyncInfo", "tcRound", syncInfo.HighestTimeoutCert.Round)
|
log.Debug("[SyncInfo] Received SyncInfo", "tcRound", syncInfo.HighestTimeoutCert.Round)
|
||||||
}
|
}
|
||||||
|
|
||||||
qcBlockNum := syncInfo.HighestQuorumCert.ProposedBlockInfo.Number.Int64()
|
qcBlockNum := syncInfo.HighestQuorumCert.ProposedBlockInfo.Number.Int64()
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@
|
||||||
package tests
|
package tests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/XinFinOrg/XDPoSChain/common"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/XinFinOrg/XDPoSChain/common"
|
||||||
"github.com/XinFinOrg/XDPoSChain/core/vm"
|
"github.com/XinFinOrg/XDPoSChain/core/vm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue