Upraises (#57)
* cleanup manifest * make block a ref type * use upraises * more upraises
This commit is contained in:
parent
d204b518e8
commit
2c4b1e6906
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue