mirror of https://github.com/status-im/nim-eth.git
support only Nim 1.6+ (#606)
This commit is contained in:
parent
607539d821
commit
7564b21ade
|
@ -22,7 +22,7 @@ jobs:
|
|||
cpu: amd64
|
||||
#- os: windows
|
||||
#cpu: i386
|
||||
branch: [version-1-2, version-1-4, version-1-6, devel]
|
||||
branch: [version-1-6, devel]
|
||||
include:
|
||||
- target:
|
||||
os: linux
|
||||
|
@ -43,7 +43,7 @@ jobs:
|
|||
|
||||
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.branch }})'
|
||||
runs-on: ${{ matrix.builder }}
|
||||
continue-on-error: ${{ matrix.branch == 'version-1-6' || matrix.branch == 'devel' }}
|
||||
continue-on-error: ${{ matrix.branch == 'devel' }}
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
12
eth.nimble
12
eth.nimble
|
@ -4,7 +4,7 @@ description = "Ethereum Common library"
|
|||
license = "MIT"
|
||||
skipDirs = @["tests"]
|
||||
|
||||
requires "nim >= 1.2.0",
|
||||
requires "nim >= 1.6.0",
|
||||
"nimcrypto",
|
||||
"stint",
|
||||
"secp256k1",
|
||||
|
@ -18,17 +18,11 @@ requires "nim >= 1.2.0",
|
|||
"testutils",
|
||||
"unittest2"
|
||||
|
||||
let styleCheckStyle =
|
||||
if (NimMajor, NimMinor) < (1, 6):
|
||||
"hint"
|
||||
else:
|
||||
"error"
|
||||
|
||||
let commonParams =
|
||||
" --skipUserCfg:on" &
|
||||
" --verbosity:0 --hints:off" &
|
||||
" --warning[ObservableStores]:off " &
|
||||
" --styleCheck:usages --styleCheck:" & styleCheckStyle &
|
||||
" --warning[ObservableStores]:off" &
|
||||
" --styleCheck:usages --styleCheck:error" &
|
||||
" " & getEnv("NIMFLAGS") &
|
||||
" -d:chronosStrictException" &
|
||||
" -d:chronicles_log_level=TRACE"
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
# Copyright (c) 2022 Status Research & Development GmbH
|
||||
# Copyright (c) 2022-2023 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
when (NimMajor, NimMinor) < (1, 4):
|
||||
{.push raises: [Defect].}
|
||||
else:
|
||||
{.push raises: [].}
|
||||
{.push raises: [].}
|
||||
|
||||
## keccak256 is used across ethereum as the "default" hash function and this
|
||||
## module provides a type and some helpers to produce such hashes
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
# Copyright (c) 2022 Status Research & Development GmbH
|
||||
# Copyright (c) 2022-2023 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
when (NimMajor, NimMinor) < (1, 4):
|
||||
{.push raises: [Defect].}
|
||||
else:
|
||||
{.push raises: [].}
|
||||
{.push raises: [].}
|
||||
|
||||
## Core ethereum types and smalll helpers - keep focused as it gets imported
|
||||
## Core ethereum types and small helpers - keep focused as it gets imported
|
||||
## from many places
|
||||
|
||||
import
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# beacon_chain
|
||||
# Copyright (c) 2018-2020 Status Research & Development GmbH
|
||||
# Copyright (c) 2018-2023 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
|
@ -8,12 +8,8 @@
|
|||
## Simple Key-Value store database interface that allows creating multiple
|
||||
## tables within each store
|
||||
|
||||
when (NimMajor, NimMinor) < (1, 4):
|
||||
{.push raises: [Defect].}
|
||||
{.pragma: callback, gcsafe, raises: [Defect].}
|
||||
else:
|
||||
{.push raises: [].}
|
||||
{.pragma: callback, gcsafe, raises: [].}
|
||||
{.push raises: [].}
|
||||
{.pragma: callback, gcsafe, raises: [].}
|
||||
|
||||
import
|
||||
std/[tables, hashes, sets],
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
## Implementation of KvStore based on sqlite3
|
||||
|
||||
when (NimMajor, NimMinor) < (1, 4):
|
||||
{.push raises: [Defect].}
|
||||
{.pragma: callback, gcsafe, raises: [Defect].}
|
||||
else:
|
||||
{.push raises: [Defect].}
|
||||
{.pragma: callback, gcsafe, raises: [].}
|
||||
{.push raises: [Defect].}
|
||||
{.pragma: callback, gcsafe, raises: [].}
|
||||
|
||||
import
|
||||
std/[os, options, strformat, typetraits],
|
||||
|
|
|
@ -32,9 +32,6 @@ proc expectHash(r: Rlp): seq[byte] =
|
|||
raise newException(RlpTypeMismatch,
|
||||
"RLP expected to be a Keccak hash value, but has an incorrect length")
|
||||
|
||||
when (NimMajor, NimMinor, NimPatch) < (1, 4, 0):
|
||||
type AssertionDefect = AssertionError
|
||||
|
||||
type MissingNodeError* = ref object of AssertionDefect
|
||||
path*: NibblesSeq
|
||||
nodeHashBytes*: seq[byte]
|
||||
|
|
|
@ -35,10 +35,6 @@ proc test_blockBodyTranscode() =
|
|||
for n in 0 ..< min(trBlkSeq.len, trBlkSeq.len):
|
||||
check (n, trBlkSeq[n]) == (n, blkSeq[n])
|
||||
|
||||
|
||||
when (NimMajor, NimMinor, NimPatch) < (1, 4, 0):
|
||||
type AssertionDefect = AssertionError
|
||||
|
||||
suite "test api usage":
|
||||
test "empty bytes are not a proper RLP":
|
||||
var rlp = rlpFromBytes seq[byte](@[])
|
||||
|
|
Loading…
Reference in New Issue