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
11 changed files with 38 additions and 15 deletions
+3 -1
View File
@@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import pkg/libp2p
import pkg/stew/byteutils
+3 -1
View File
@@ -9,7 +9,9 @@
# 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/questionable
+3 -1
View File
@@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import std/os
import std/options
+3 -1
View File
@@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import std/tables
+3 -1
View File
@@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import std/tables
import pkg/libp2p/protobuf/minprotobuf
+4 -1
View File
@@ -7,7 +7,10 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import std/sequtils
+6 -4
View File
@@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import pkg/chronos
import pkg/libp2p
@@ -26,7 +28,7 @@ method getBlock*(
## Get a block from the stores
##
doAssert(false, "Not implemented!")
raiseAssert("Not implemented!")
method putBlock*(
s: BlockStore,
@@ -34,7 +36,7 @@ method putBlock*(
## Put a block to the blockstore
##
doAssert(false, "Not implemented!")
raiseAssert("Not implemented!")
method delBlock*(
s: BlockStore,
@@ -42,7 +44,7 @@ method delBlock*(
## Delete a block/s from the block store
##
doAssert(false, "Not implemented!")
raiseAssert("Not implemented!")
method hasBlock*(s: BlockStore, cid: Cid): bool {.base.} =
## Check if the block exists in the blockstore
+4 -2
View File
@@ -7,10 +7,12 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import std/options
import std/sequtils
import pkg/chronicles
import pkg/chronos
+3 -1
View File
@@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import std/os
+3 -1
View File
@@ -7,7 +7,9 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import pkg/chronicles
import pkg/chronos
+3 -1
View File
@@ -9,7 +9,9 @@
## Partially taken from nim beacon chain
{.push raises: [Defect].}
import pkg/upraises
push: {.upraises: [].}
import std/strutils