nim-eth/eth.nimble
Zahary Karadjov 3efec171a6 Make the APIs compatible with libp2p
Lib2P2 handles RPC requests and responses with separate streams
while DEV2P2 is relying on tagged messages transmitted over a
single stream. To cover both models through the same application
code, we introduce a new `response` variable in the request handlers.
The user is supposed to issue a call to `response.send` in order to
reply to the request. Please note that the `response.send` signature
is strongly typed and depends on the current message.
2019-03-12 13:36:39 +02:00

50 lines
1.1 KiB
Nim

version = "1.0.0"
author = "Status Research & Development GmbH"
description = "Ethereum Common library"
license = "MIT"
skipDirs = @["tests"]
requires "nim >= 0.19.0",
"nimcrypto",
"ranges",
"stint",
"byteutils",
"secp256k1",
"rocksdb",
"package_visible_types",
"chronos",
"chronicles",
"std_shims"
import strutils
import oswalkdir, ospaths # In newer nim these are merged to os
proc test(path: string) =
echo "Running: ", path
exec "nim c -r " & path
proc run_tests(dir: string) =
for path in walkDirRec(dir):
let fname = splitPath(path).tail
if fname.startsWith("test_") and fname.endsWith(".nim"):
test(path)
task test, "run tests":
run_tests("tests")
task test_keyfile, "run keyfile tests":
run_tests("tests/keyfile")
task test_keys, "run keys tests":
run_tests("tests/keys")
task test_p2p, "run p2p tests":
run_tests("tests/p2p")
task test_rlp, "run rlp tests":
run_tests("tests/rlp")
task test_trie, "run trie tests":
run_tests("tests/trie")