Skip to content

Commit

Permalink
Merge pull request expanse-org#24 from happyuc-project/debug/v0.0.2
Browse files Browse the repository at this point in the history
Fix tx adds bug
  • Loading branch information
ldcc committed May 25, 2018
2 parents e60c02b + ff5bcba commit d860511
Show file tree
Hide file tree
Showing 67 changed files with 254 additions and 258 deletions.
2 changes: 1 addition & 1 deletion accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
"github.com/happyuc-project/happyuc-go/core/state"
"github.com/happyuc-project/happyuc-go/core/types"
"github.com/happyuc-project/happyuc-go/core/vm"
"github.com/happyuc-project/happyuc-go/event"
"github.com/happyuc-project/happyuc-go/huc/filters"
"github.com/happyuc-project/happyuc-go/hucdb"
"github.com/happyuc-project/happyuc-go/event"
"github.com/happyuc-project/happyuc-go/params"
"github.com/happyuc-project/happyuc-go/rpc"
)
Expand Down
4 changes: 3 additions & 1 deletion accounts/keystore/account_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ func (ac *accountCache) scanAccounts() error {
// Create a helper method to scan the contents of the key files
var (
buf = new(bufio.Reader)
key struct{ Address string `json:"address"` }
key struct {
Address string `json:"address"`
}
)
readAccount := func(path string) *accounts.Account {
fd, err := os.Open(path)
Expand Down
262 changes: 131 additions & 131 deletions accounts/usbwallet/internal/trezor/messages.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion accounts/usbwallet/trezor.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ import (
"io"
"math/big"

"github.com/golang/protobuf/proto"
"github.com/happyuc-project/happyuc-go/accounts"
"github.com/happyuc-project/happyuc-go/accounts/usbwallet/internal/trezor"
"github.com/happyuc-project/happyuc-go/common"
"github.com/happyuc-project/happyuc-go/common/hexutil"
"github.com/happyuc-project/happyuc-go/core/types"
"github.com/happyuc-project/happyuc-go/log"
"github.com/golang/protobuf/proto"
)

// ErrTrezorPINNeeded is returned if opening the trezor requires a PIN code. In
Expand Down
8 changes: 4 additions & 4 deletions accounts/usbwallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ type wallet struct {
accounts []accounts.Account // List of derive accounts pinned on the hardware wallet
paths map[common.Address]accounts.DerivationPath // Known derivation paths for signing operations

deriveNextPath accounts.DerivationPath // Next derivation path for account auto-discovery
deriveNextAddr common.Address // Next derived account address for auto-discovery
deriveNextPath accounts.DerivationPath // Next derivation path for account auto-discovery
deriveNextAddr common.Address // Next derived account address for auto-discovery
deriveChain happyuc.ChainStateReader // Blockchain state reader to discover used account with
deriveReq chan chan struct{} // Channel to request a self-derivation on
deriveQuit chan chan error // Channel to terminate the self-deriver with
deriveReq chan chan struct{} // Channel to request a self-derivation on
deriveQuit chan chan error // Channel to terminate the self-deriver with

healthQuit chan chan error

Expand Down
2 changes: 1 addition & 1 deletion cmd/ghuc/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"github.com/happyuc-project/happyuc-go/core"
"github.com/happyuc-project/happyuc-go/core/state"
"github.com/happyuc-project/happyuc-go/core/types"
"github.com/happyuc-project/happyuc-go/event"
"github.com/happyuc-project/happyuc-go/huc/downloader"
"github.com/happyuc-project/happyuc-go/hucdb"
"github.com/happyuc-project/happyuc-go/event"
"github.com/happyuc-project/happyuc-go/log"
"github.com/happyuc-project/happyuc-go/trie"
"github.com/syndtr/goleveldb/leveldb/util"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ghuc/consolecmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main

import (
"crypto/rand"
"github.com/happyuc-project/happyuc-go/params"
"math/big"
"os"
"path/filepath"
Expand All @@ -26,7 +27,6 @@ import (
"strings"
"testing"
"time"
"github.com/happyuc-project/happyuc-go/params"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/ghuc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/happyuc-project/happyuc-go/accounts"
"github.com/happyuc-project/happyuc-go/accounts/keystore"
"github.com/happyuc-project/happyuc-go/cmd/utils"
"github.com/happyuc-project/happyuc-go/common"
"github.com/happyuc-project/happyuc-go/console"
"github.com/happyuc-project/happyuc-go/huc"
"github.com/happyuc-project/happyuc-go/hucclient"
Expand All @@ -36,7 +37,6 @@ import (
"github.com/happyuc-project/happyuc-go/metrics"
"github.com/happyuc-project/happyuc-go/node"
"gopkg.in/urfave/cli.v1"
"github.com/happyuc-project/happyuc-go/common"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/ghuc/monitorcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"strings"
"time"

"github.com/gizak/termui"
"github.com/happyuc-project/happyuc-go/cmd/utils"
"github.com/happyuc-project/happyuc-go/node"
"github.com/happyuc-project/happyuc-go/rpc"
"github.com/gizak/termui"
"gopkg.in/urfave/cli.v1"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/ghuc/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ type testghuc struct {
*cmdtest.TestCmd

// template variables for expect
Datadir string
Coinbase string
Datadir string
Coinbase string
}

func init() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/pupphuc/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
// C++ HappyUC implementation.
type cppHappyUCGenesisSpec struct {
SealEngine string `json:"sealEngine"`
Params struct {
Params struct {
AccountStartNonce hexutil.Uint64 `json:"accountStartNonce"`
HomesteadForkBlock hexutil.Uint64 `json:"homesteadForkBlock"`
EIP150ForkBlock hexutil.Uint64 `json:"EIP150ForkBlock"`
Expand Down Expand Up @@ -164,7 +164,7 @@ func newCppHappyUCGenesisSpec(network string, genesis *core.Genesis) (*cppHappyU

// parityChainSpec is the chain specification format used by Parity.
type parityChainSpec struct {
Name string `json:"name"`
Name string `json:"name"`
Engine struct {
Huchash struct {
Params struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/pupphuc/module_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func deployNode(client *sshClient, network string, bootnodes []string, config *n
"LightFlag": lightFlag,
"Bootnodes": strings.Join(bootnodes, ","),
"Hucstats": config.hucstats,
"Coinbase": config.coinbase,
"Coinbase": config.coinbase,
"GasTarget": uint64(1000000 * config.gasTarget),
"GasPrice": uint64(1000000000 * config.gasPrice),
"Unlock": config.keyJSON != "",
Expand All @@ -120,7 +120,7 @@ func deployNode(client *sshClient, network string, bootnodes []string, config *n
"Light": config.peersLight > 0,
"LightPeers": config.peersLight,
"Hucstats": config.hucstats[:strings.Index(config.hucstats, ":")],
"Coinbase": config.coinbase,
"Coinbase": config.coinbase,
"GasTarget": config.gasTarget,
"GasPrice": config.gasPrice,
})
Expand Down
2 changes: 1 addition & 1 deletion consensus/huchash/huchash.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ type Huchash struct {
hashrate metrics.Meter // Meter tracking the average hashrate

// The fields below are hooks for testing
shared *Huchash // Shared PoW verifier to avoid cache regeneration
shared *Huchash // Shared PoW verifier to avoid cache regeneration
fakeFail uint64 // Block number which fails PoW check even in fake mode
fakeDelay time.Duration // Time delay to sleep for before returning from verify

Expand Down
6 changes: 3 additions & 3 deletions console/console_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ func newTester(t *testing.T, confOverride func(*huc.Config)) *tester {
t.Fatalf("failed to create node: %v", err)
}
hucConf := &huc.Config{
Genesis : core.DeveloperGenesisBlock(15, common.Address{}),
Genesis: core.DeveloperGenesisBlock(15, common.Address{}),
Coinbase: common.HexToAddress(testAddress),
Huchash : huchash.Config{
Huchash: huchash.Config{
PowMode: huchash.ModeTest,
},
}
Expand All @@ -117,7 +117,7 @@ func newTester(t *testing.T, confOverride func(*huc.Config)) *tester {
t.Fatalf("failed to attach to node: %v", err)
}
prompter := &hookedPrompter{scheduler: make(chan string)}
printer := new(bytes.Buffer)
printer := new(bytes.Buffer)

console, err := New(Config{
DataDir: stack.InstanceDir(),
Expand Down
6 changes: 3 additions & 3 deletions contracts/chequebook/contract/chequebook.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions contracts/ens/contract/ens.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions contracts/ens/contract/publicresolver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
"github.com/happyuc-project/happyuc-go/core/types"
"github.com/happyuc-project/happyuc-go/core/vm"
"github.com/happyuc-project/happyuc-go/crypto"
"github.com/happyuc-project/happyuc-go/hucdb"
"github.com/happyuc-project/happyuc-go/event"
"github.com/happyuc-project/happyuc-go/hucdb"
"github.com/happyuc-project/happyuc-go/log"
"github.com/happyuc-project/happyuc-go/metrics"
"github.com/happyuc-project/happyuc-go/params"
Expand Down Expand Up @@ -691,7 +691,7 @@ func (bc *BlockChain) procFutureBlocks() {
type WriteStatus byte

const (
NonStatTy WriteStatus = iota
NonStatTy WriteStatus = iota
CanonStatTy
SideStatTy
)
Expand Down
2 changes: 1 addition & 1 deletion core/chain_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"github.com/happyuc-project/happyuc-go/common"
"github.com/happyuc-project/happyuc-go/core/types"
"github.com/happyuc-project/happyuc-go/hucdb"
"github.com/happyuc-project/happyuc-go/event"
"github.com/happyuc-project/happyuc-go/hucdb"
"github.com/happyuc-project/happyuc-go/log"
)

Expand Down
2 changes: 1 addition & 1 deletion core/database_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var (
lookupPrefix = []byte("l") // lookupPrefix + hash -> transaction/receipt lookup metadata
bloomBitsPrefix = []byte("B") // bloomBitsPrefix + bit (uint16 big endian) + section (uint64 big endian) + hash -> bloom bits

preimagePrefix = "secure-key-" // preimagePrefix + hash -> preimage
preimagePrefix = "secure-key-" // preimagePrefix + hash -> preimage
configPrefix = []byte("happyuc-config-") // config prefix for the db

// Chain index prefixes (use `i` + single byte to avoid mixing data types).
Expand Down
2 changes: 1 addition & 1 deletion core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis {
common.BytesToAddress([]byte{6}): {Balance: big.NewInt(1)}, // ECAdd
common.BytesToAddress([]byte{7}): {Balance: big.NewInt(1)}, // ECScalarMul
common.BytesToAddress([]byte{8}): {Balance: big.NewInt(1)}, // ECPairing
faucet: {Balance: new(big.Int).Sub(new(big.Int).Lsh(big.NewInt(1), 256), big.NewInt(9))},
faucet: {Balance: new(big.Int).Sub(new(big.Int).Lsh(big.NewInt(1), 256), big.NewInt(9))},
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"fmt"

"github.com/happyuc-project/happyuc-go/core/types"
"github.com/happyuc-project/happyuc-go/hucdb"
"github.com/happyuc-project/happyuc-go/event"
"github.com/happyuc-project/happyuc-go/hucdb"
)

// Implement our EthTest Manager
Expand Down

0 comments on commit d860511

Please sign in to comment.