Upraises (#57)

* cleanup manifest

* make block a ref type

* use upraises

* more upraises
This commit is contained in:
Dmitriy Ryajov 2022-03-18 16:17:51 -06:00 committed by GitHub
parent d204b518e8
commit 2c4b1e6906
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 38 additions and 15 deletions

View File

@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import pkg/libp2p import pkg/libp2p
import pkg/stew/byteutils import pkg/stew/byteutils

View File

@ -9,7 +9,9 @@
# TODO: This is super inneficient and needs a rewrite, but it'll do for now # TODO: This is super inneficient and needs a rewrite, but it'll do for now
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import pkg/chronicles import pkg/chronicles
import pkg/questionable import pkg/questionable

View File

@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import std/os import std/os
import std/options import std/options

View File

@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import std/tables import std/tables

View File

@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import std/tables import std/tables
import pkg/libp2p/protobuf/minprotobuf import pkg/libp2p/protobuf/minprotobuf

View File

@ -7,7 +7,10 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import std/sequtils import std/sequtils

View File

@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import pkg/chronos import pkg/chronos
import pkg/libp2p import pkg/libp2p
@ -26,7 +28,7 @@ method getBlock*(
## Get a block from the stores ## Get a block from the stores
## ##
doAssert(false, "Not implemented!") raiseAssert("Not implemented!")
method putBlock*( method putBlock*(
s: BlockStore, s: BlockStore,
@ -34,7 +36,7 @@ method putBlock*(
## Put a block to the blockstore ## Put a block to the blockstore
## ##
doAssert(false, "Not implemented!") raiseAssert("Not implemented!")
method delBlock*( method delBlock*(
s: BlockStore, s: BlockStore,
@ -42,7 +44,7 @@ method delBlock*(
## Delete a block/s from the block store ## Delete a block/s from the block store
## ##
doAssert(false, "Not implemented!") raiseAssert("Not implemented!")
method hasBlock*(s: BlockStore, cid: Cid): bool {.base.} = method hasBlock*(s: BlockStore, cid: Cid): bool {.base.} =
## Check if the block exists in the blockstore ## Check if the block exists in the blockstore

View File

@ -7,10 +7,12 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import std/options import std/options
import std/sequtils
import pkg/chronicles import pkg/chronicles
import pkg/chronos import pkg/chronos

View File

@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import std/os import std/os

View File

@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import pkg/chronicles import pkg/chronicles
import pkg/chronos import pkg/chronos

View File

@ -9,7 +9,9 @@
## Partially taken from nim beacon chain ## Partially taken from nim beacon chain
{.push raises: [Defect].} import pkg/upraises
push: {.upraises: [].}
import std/strutils import std/strutils