proto files

pull/192/head
ak 6 years ago
parent 54bab27bc4
commit 99bdb39875
  1. 0
      api/proto/bcconn/bcconn.go
  2. 0
      api/proto/bcconn/bcconn_test.go
  3. 0
      api/proto/common.go
  4. 2
      api/proto/identity/identity.go
  5. 2
      api/proto/node/node.go
  6. 2
      api/proto/node/pingpong.go
  7. 2
      api/proto/node/pingpong_test.go
  8. 2
      client/txgen/main.go
  9. 2
      client/wallet/main.go
  10. 2
      consensus/consensus.go
  11. 3
      consensus/consensus_leader_msg.go
  12. 2
      consensus/consensus_validator_msg.go
  13. 4
      internal/beaconchain/libs/beaconchain.go
  14. 4
      internal/beaconchain/libs/beaconchain_handler.go
  15. 2
      internal/beaconchain/rpc/server.go
  16. 4
      internal/newnode/newnode.go
  17. 4
      internal/newnode/newnode_handler.go
  18. 2
      node/node.go
  19. 9
      node/node_handler.go
  20. 2
      node/node_test.go

@ -4,7 +4,7 @@ import (
"bytes"
"errors"
"github.com/harmony-one/harmony/proto"
"github.com/harmony-one/harmony/api/proto"
)
// IdentityMessageTypeBytes is the number of bytes consensus message type occupies

@ -8,8 +8,8 @@ import (
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/core/types"
"github.com/harmony-one/harmony/api/proto"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/proto"
)
// MessageType is to indicate the specific type of message under Node category

@ -17,8 +17,8 @@ import (
"log"
"github.com/dedis/kyber"
"github.com/harmony-one/harmony/api/proto"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/proto"
)
// RoleType defines the role of the node

@ -6,10 +6,10 @@ import (
"testing"
"github.com/dedis/kyber"
"github.com/harmony-one/harmony/api/proto"
"github.com/harmony-one/harmony/crypto"
"github.com/harmony-one/harmony/crypto/pki"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/proto"
)
var (

@ -9,6 +9,7 @@ import (
"sync"
"time"
proto_node "github.com/harmony-one/harmony/api/proto/node"
"github.com/harmony-one/harmony/client"
"github.com/harmony-one/harmony/client/txgen/txgen"
"github.com/harmony-one/harmony/consensus"
@ -19,7 +20,6 @@ import (
"github.com/harmony-one/harmony/node"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/p2pimpl"
proto_node "github.com/harmony-one/harmony/proto/node"
)
var (

@ -17,6 +17,7 @@ import (
"github.com/ethereum/go-ethereum/common"
crypto2 "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
proto_node "github.com/harmony-one/harmony/api/proto/node"
"github.com/harmony-one/harmony/client"
client2 "github.com/harmony-one/harmony/client/service"
"github.com/harmony-one/harmony/core/types"
@ -25,7 +26,6 @@ import (
"github.com/harmony-one/harmony/node"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/p2pimpl"
proto_node "github.com/harmony-one/harmony/proto/node"
)
var (

@ -22,7 +22,7 @@ import (
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/host"
proto_node "github.com/harmony-one/harmony/proto/node"
proto_node "github.com/harmony-one/harmony/api/proto/node"
)
// Consensus is the main struct with all states and data related to consensus process.

@ -2,11 +2,12 @@ package consensus
import (
"bytes"
"github.com/dedis/kyber"
consensus_proto "github.com/harmony-one/harmony/api/consensus"
"github.com/harmony-one/harmony/api/proto"
"github.com/harmony-one/harmony/crypto"
"github.com/harmony-one/harmony/log"
"github.com/harmony-one/harmony/proto"
)
// Constructs the announce message

@ -3,8 +3,8 @@ package consensus
import (
"github.com/dedis/kyber"
consensus_proto "github.com/harmony-one/harmony/api/consensus"
"github.com/harmony-one/harmony/api/proto"
"github.com/harmony-one/harmony/crypto"
"github.com/harmony-one/harmony/proto"
)
// Construct the commit message to send to leader (assumption the consensus data is already verified)

@ -7,6 +7,8 @@ import (
"github.com/dedis/kyber"
"github.com/harmony-one/harmony/api/proto/bcconn"
proto_identity "github.com/harmony-one/harmony/api/proto/identity"
"github.com/harmony-one/harmony/crypto/pki"
"github.com/harmony-one/harmony/internal/beaconchain/rpc"
"github.com/harmony-one/harmony/internal/utils"
@ -14,8 +16,6 @@ import (
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/host"
"github.com/harmony-one/harmony/p2p/p2pimpl"
"github.com/harmony-one/harmony/proto/bcconn"
proto_identity "github.com/harmony-one/harmony/proto/identity"
)
var mutex sync.Mutex

@ -1,9 +1,9 @@
package beaconchain
import (
"github.com/harmony-one/harmony/api/proto"
proto_identity "github.com/harmony-one/harmony/api/proto/identity"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/proto"
proto_identity "github.com/harmony-one/harmony/proto/identity"
)
// BeaconChainHandler handles registration of new Identities

@ -5,7 +5,7 @@ import (
"log"
"net"
"github.com/harmony-one/harmony/proto/bcconn"
"github.com/harmony-one/harmony/api/proto/bcconn"
"google.golang.org/grpc"

@ -8,14 +8,14 @@ import (
"github.com/dedis/kyber"
"github.com/harmony-one/harmony/api/proto/bcconn"
proto_identity "github.com/harmony-one/harmony/api/proto/identity"
"github.com/harmony-one/harmony/crypto"
"github.com/harmony-one/harmony/internal/utils"
"github.com/harmony-one/harmony/log"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/host"
"github.com/harmony-one/harmony/p2p/p2pimpl"
"github.com/harmony-one/harmony/proto/bcconn"
proto_identity "github.com/harmony-one/harmony/proto/identity"
)
//NewNode is ther struct for a candidate node

@ -3,9 +3,9 @@ package newnode
import (
"time"
"github.com/harmony-one/harmony/api/proto"
proto_identity "github.com/harmony-one/harmony/api/proto/identity"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/proto"
proto_identity "github.com/harmony-one/harmony/proto/identity"
)
// NodeHandler handles a new incoming connection.

@ -18,6 +18,7 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
proto_node "github.com/harmony-one/harmony/api/proto/node"
"github.com/harmony-one/harmony/client"
clientService "github.com/harmony-one/harmony/client/service"
bft "github.com/harmony-one/harmony/consensus"
@ -30,7 +31,6 @@ import (
"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"

@ -3,20 +3,21 @@ package node
import (
"bytes"
"fmt"
"github.com/ethereum/go-ethereum/common"
"os"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/dedis/kyber"
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/api/proto"
proto_identity "github.com/harmony-one/harmony/api/proto/identity"
proto_node "github.com/harmony-one/harmony/api/proto/node"
"github.com/harmony-one/harmony/core/types"
hmy_crypto "github.com/harmony-one/harmony/crypto"
"github.com/harmony-one/harmony/crypto/pki"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/host"
"github.com/harmony-one/harmony/proto"
proto_identity "github.com/harmony-one/harmony/proto/identity"
proto_node "github.com/harmony-one/harmony/proto/node"
)
const (

@ -6,13 +6,13 @@ import (
"testing"
"time"
proto_node "github.com/harmony-one/harmony/api/proto/node"
"github.com/harmony-one/harmony/consensus"
"github.com/harmony-one/harmony/crypto"
"github.com/harmony-one/harmony/crypto/pki"
"github.com/harmony-one/harmony/internal/utils"
"github.com/harmony-one/harmony/p2p"
"github.com/harmony-one/harmony/p2p/p2pimpl"
proto_node "github.com/harmony-one/harmony/proto/node"
)
func TestNewNewNode(t *testing.T) {

Loading…
Cancel
Save