accounts, consensus: formatting + fix error in tests

This commit is contained in:
Martin Holst Swende 2018-12-07 11:17:52 +01:00
parent bfa4fb0521
commit 6f38dbc302
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
5 changed files with 6 additions and 7 deletions

View file

@ -18,7 +18,6 @@ package external
import (
"fmt"
"github.com/ethereum/go-ethereum/crypto"
"math/big"
"sync"
@ -27,6 +26,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/log"

View file

@ -17,12 +17,12 @@
package keystore
import (
"github.com/ethereum/go-ethereum/crypto"
"math/big"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
)
// keystoreWallet implements the accounts.Wallet interface for the original

View file

@ -20,7 +20,6 @@ package usbwallet
import (
"context"
"fmt"
"github.com/ethereum/go-ethereum/crypto"
"io"
"math/big"
"sync"
@ -30,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/karalabe/hid"
)

View file

@ -20,8 +20,6 @@ package clique
import (
"bytes"
"errors"
"github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/rlp"
"math/big"
"math/rand"
"sync"
@ -35,9 +33,11 @@ import (
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
lru "github.com/hashicorp/golang-lru"
)

View file

@ -22,7 +22,6 @@ import (
"sort"
"testing"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
@ -81,7 +80,7 @@ func (ap *testerAccountPool) sign(header *types.Header, signer string) {
ap.accounts[signer], _ = crypto.GenerateKey()
}
// Sign the header and embed the signature in extra data
sig, _ := crypto.Sign(accounts.CliqueHash(header).Bytes(), ap.accounts[signer])
sig, _ := crypto.Sign(SealHash(header).Bytes(), ap.accounts[signer])
copy(header.Extra[len(header.Extra)-extraSeal:], sig)
}