Merge branch 'master' of github.com:harmony-one/harmony into rj_branch

pull/189/head
Rongjian Lan 6 years ago
commit a3f701399d
  1. 7
      benchmark.go
  2. 15
      consensus/consensus_leader.go
  3. 3
      core/blockchain.go
  4. 3
      core/chain_makers.go
  5. 2
      core/genesis.go
  6. 2
      core/headerchain.go
  7. 2
      core/state/database.go
  8. 2
      core/state/managed_state_test.go
  9. 3
      core/state/state_test.go
  10. 2
      core/state/statedb_test.go
  11. 2
      core/tx_pool_test.go
  12. 2
      core/vm/runtime/runtime.go
  13. 2
      core/vm/runtime/runtime_test.go
  14. 4
      harmony/main.go
  15. 0
      internal/db/db.go
  16. 0
      internal/db/db_test.go
  17. 0
      internal/db/interface.go
  18. 0
      internal/db/memory_db.go
  19. 0
      internal/profiler/profiler.go
  20. 12
      node/node.go
  21. 2
      services/explorer/storage.go
  22. 2
      trie/database.go
  23. 2
      trie/iterator_test.go
  24. 3
      trie/proof.go
  25. 2
      trie/secure_trie_test.go
  26. 3
      trie/sync_test.go
  27. 2
      trie/trie_test.go

@ -9,16 +9,15 @@ import (
"runtime"
"time"
"github.com/harmony-one/harmony/p2p/p2pimpl"
"github.com/harmony-one/harmony/consensus"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/attack"
"github.com/harmony-one/harmony/internal/db"
"github.com/harmony-one/harmony/internal/profiler"
"github.com/harmony-one/harmony/log"
pkg_newnode "github.com/harmony-one/harmony/newnode"
"github.com/harmony-one/harmony/node"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/profiler"
"github.com/harmony-one/harmony/p2p/p2pimpl"
)
var (

@ -4,22 +4,21 @@ import (
"bytes"
"encoding/hex"
"errors"
"github.com/ethereum/go-ethereum/rlp"
"strconv"
"time"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/p2p/host"
"github.com/harmony-one/harmony/services/explorer"
consensus_proto "github.com/harmony-one/harmony/api/consensus"
"github.com/harmony-one/harmony/profiler"
"github.com/dedis/kyber"
"github.com/dedis/kyber/sign/schnorr"
"github.com/ethereum/go-ethereum/rlp"
consensus_proto "github.com/harmony-one/harmony/api/consensus"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/crypto"
"github.com/harmony-one/harmony/internal/profiler"
"github.com/harmony-one/harmony/log"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/host"
"github.com/harmony-one/harmony/services/explorer"
)
const (

@ -27,8 +27,6 @@ import (
"sync/atomic"
"time"
hdb "github.com/harmony-one/harmony/db"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/mclock"
"github.com/ethereum/go-ethereum/common/prque"
@ -43,6 +41,7 @@ import (
"github.com/harmony-one/harmony/core/state"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/core/vm"
hdb "github.com/harmony-one/harmony/internal/db"
"github.com/harmony-one/harmony/trie"
"github.com/hashicorp/golang-lru"
)

@ -20,14 +20,13 @@ import (
"fmt"
"math/big"
hdb "github.com/harmony-one/harmony/db"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/params"
"github.com/harmony-one/harmony/consensus"
"github.com/harmony-one/harmony/core/state"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/core/vm"
hdb "github.com/harmony-one/harmony/internal/db"
)
// BlockGen creates blocks for testing.

@ -32,7 +32,7 @@ import (
"github.com/harmony-one/harmony/core/rawdb"
"github.com/harmony-one/harmony/core/state"
"github.com/harmony-one/harmony/core/types"
hdb "github.com/harmony-one/harmony/db"
hdb "github.com/harmony-one/harmony/internal/db"
)
//go:generate gencodec -type Genesis -field-override genesisSpecMarshaling -out gen_genesis.go

@ -32,7 +32,7 @@ import (
"github.com/harmony-one/harmony/consensus"
"github.com/harmony-one/harmony/core/rawdb"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
"github.com/hashicorp/golang-lru"
)

@ -21,7 +21,7 @@ import (
"sync"
"github.com/ethereum/go-ethereum/common"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
"github.com/harmony-one/harmony/trie"
lru "github.com/hashicorp/golang-lru"
)

@ -20,7 +20,7 @@ import (
"testing"
"github.com/ethereum/go-ethereum/common"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
)
var addr = common.BytesToAddress([]byte("test"))

@ -21,10 +21,9 @@ import (
"math/big"
"testing"
"github.com/harmony-one/harmony/db"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/harmony-one/harmony/internal/db"
checker "gopkg.in/check.v1"
)

@ -32,7 +32,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
)
// Tests that updating a state trie does not leak any database writes prior to

@ -32,7 +32,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/harmony-one/harmony/core/state"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
)
// testTxPoolConfig is a transaction pool configuration without stateful disk

@ -26,7 +26,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/harmony-one/harmony/core/state"
"github.com/harmony-one/harmony/core/vm"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
)
// Config is a basic type specifying certain configuration flags for running

@ -26,7 +26,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/harmony-one/harmony/core/state"
"github.com/harmony-one/harmony/core/vm"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
)
func TestDefaults(t *testing.T) {

@ -3,17 +3,17 @@ package main
import (
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/common"
"log"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
"github.com/harmony-one/harmony/consensus"
"github.com/harmony-one/harmony/core"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/core/vm"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
"github.com/harmony-one/harmony/node/worker"
)

@ -6,7 +6,6 @@ import (
"encoding/gob"
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/rlp"
"math/big"
"os"
"strconv"
@ -15,25 +14,24 @@ import (
"sync/atomic"
"time"
"github.com/harmony-one/harmony/services/explorer"
"github.com/harmony-one/harmony/client"
clientService "github.com/harmony-one/harmony/client/service"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/client"
clientService "github.com/harmony-one/harmony/client/service"
bft "github.com/harmony-one/harmony/consensus"
"github.com/harmony-one/harmony/core"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/core/vm"
"github.com/harmony-one/harmony/crypto/pki"
hdb "github.com/harmony-one/harmony/db"
hdb "github.com/harmony-one/harmony/internal/db"
"github.com/harmony-one/harmony/log"
"github.com/harmony-one/harmony/node/worker"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/host"
proto_node "github.com/harmony-one/harmony/proto/node"
"github.com/harmony-one/harmony/services/explorer"
"github.com/harmony-one/harmony/services/syncing"
"github.com/harmony-one/harmony/services/syncing/downloader"
downloader_pb "github.com/harmony-one/harmony/services/syncing/downloader/proto"

@ -8,7 +8,7 @@ import (
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
"github.com/harmony-one/harmony/log"
)

@ -26,7 +26,7 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/rlp"
hdb "github.com/harmony-one/harmony/db"
hdb "github.com/harmony-one/harmony/internal/db"
)
var (

@ -23,7 +23,7 @@ import (
"testing"
"github.com/ethereum/go-ethereum/common"
hdb "github.com/harmony-one/harmony/db"
hdb "github.com/harmony-one/harmony/internal/db"
)
func TestIterator(t *testing.T) {

@ -20,12 +20,11 @@ import (
"bytes"
"fmt"
"github.com/harmony-one/harmony/db"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/internal/db"
)
// Prove constructs a merkle proof for key. The result contains all encoded nodes

@ -24,7 +24,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
)
func newEmptySecure() *SecureTrie {

@ -20,9 +20,8 @@ import (
"bytes"
"testing"
"github.com/harmony-one/harmony/db"
"github.com/ethereum/go-ethereum/common"
"github.com/harmony-one/harmony/internal/db"
)
// makeTestTrie create a sample test trie to test node-wise reconstruction.

@ -33,7 +33,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/db"
"github.com/harmony-one/harmony/internal/db"
)
func init() {

Loading…
Cancel
Save