rename package to eth_p2p to make it consistent with our naming scheme

This commit is contained in:
Zahary Karadjov 2018-06-16 21:58:41 +03:00
parent a06bd8789e
commit 812c6284c0
21 changed files with 26 additions and 20 deletions

View File

@ -5,8 +5,10 @@
This library is a Nim re-implementation of the Ethereum DevP2P networking protocol.
## Installation
$ nimble install ethp2p
```
$ nimble install eth_p2p
```
## RLPx
@ -16,7 +18,7 @@ network. Most of the client code of this library should not be concerned
with the implementation details of the underlying protocols and should use
the high-level APIs described in this section.
To obtain a RLPx connection, use the proc `rlpxConnect` supplying the
To obtain a RLPx connection, use the `rlpxConnect` proc supplying the
id of another node in the network. On success, the proc will return a
`Peer` object representing the connection. Each of the RLPx sub-protocols
consists of a set of strongly-typed messages, which are represented by

View File

@ -8,5 +8,5 @@
# MIT license (LICENSE-MIT)
#
import ethp2p/[ecies, auth, enode, rlpxcrypt, discovery, kademlia]
import eth_p2p/[ecies, auth, enode, rlpxcrypt, discovery, kademlia]
export ecies, auth, enode, rlpxcrypt, discovery, kademlia

View File

@ -1,6 +1,6 @@
mode = ScriptMode.Verbose
packageName = "ethp2p"
packageName = "eth_p2p"
version = "1.0.0"
author = "Status Research & Development GmbH"
description = "Ethereum P2P library"
@ -14,7 +14,7 @@ requires "nim > 0.18.0",
"eth_keys",
"ranges",
"stint",
"https://github.com/status-im/nim-byteutils"
"byteutils"
proc runTest(name: string, lang = "c") = exec "nim " & lang & " -r tests/" & name

View File

@ -1,7 +1,6 @@
import ../ethp2p/[discovery, kademlia, peer_pool, enode]
import eth_keys, net, asyncdispatch, sequtils
import logging, byteutils
import
eth_keys, net, asyncdispatch, sequtils, logging, byteutils,
../eth_p2p/[discovery, kademlia, peer_pool, enode]
addHandler(newConsoleLogger())

View File

@ -7,8 +7,9 @@
# distribution, for details about the copyright.
#
import unittest
import eth_keys, ethp2p/auth, nimcrypto/utils, nimcrypto/keccak
import
unittest, eth_keys, nimcrypto/[utils, keccak],
eth_p2p/auth
# This was generated by `print` actual auth message generated by
# https://github.com/ethereum/py-evm/blob/master/tests/p2p/test_auth.py

View File

@ -7,9 +7,10 @@
# distribution, for details about the copyright.
#
import unittest
import eth_keys, ethp2p/auth, ethp2p/rlpxcrypt, nimcrypto/utils
import nimcrypto/sysrand, nimcrypto/keccak
import
unittest, eth_keys,
nimcrypto/[utils, sysrand, nimcrypto/keccak],
eth_p2p/[auth, rlpxcrypt]
const data = [
("initiator_private_key",

View File

@ -7,9 +7,10 @@
# distribution, for details about the copyright.
#
import unittest
import eth_keys, ethp2p/ecies
import nimcrypto/utils, nimcrypto/sha2, nimcrypto/hmac, nimcrypto/rijndael
import
unittest, eth_keys,
nimcrypto/[utils, sha2, hmac, rijndael],
eth_p2p/ecies
proc compare[A, B](x: openarray[A], y: openarray[B], s: int = 0): bool =
result = true

View File

@ -7,7 +7,8 @@
# Apache License, version 2.0, (LICENSE-APACHEv2)
# MIT license (LICENSE-MIT)
import unittest, net, ethp2p/enode
import
unittest, net, eth_p2p/enode
suite "ENode":
test "Go-Ethereum tests":

View File

@ -1,5 +1,6 @@
import ../ethp2p/[discovery, kademlia, peer_pool, enode, server, rlpx]
import eth_keys, net, asyncdispatch, sequtils
import
eth_keys, net, asyncdispatch, sequtils,
../eth_p2p/[discovery, kademlia, peer_pool, enode, server, rlpx]
proc localAddress(port: int): Address =
let port = Port(port)