This commit is contained in:
Marto 2024-02-13 14:15:50 +02:00
parent f5efc25161
commit f4d3d012fb
10 changed files with 7 additions and 9 deletions

View File

@ -13,7 +13,6 @@ import tracker
import state import state
import std/[times] import std/[times]
import std/sequtils
import std/random import std/random

View File

@ -1,5 +1,4 @@
import types import types
import std/sequtils
import std/[times] import std/[times]
type type

View File

@ -14,7 +14,7 @@ version = "0.0.1"
author = "Status Research & Development GmbH" author = "Status Research & Development GmbH"
description = "raft consensus in nim" description = "raft consensus in nim"
license = "Apache License 2.0" license = "Apache License 2.0"
srcDir = "src" srcDir = "libs"
installExt = @["nim"] installExt = @["nim"]
skipDirs = @["tests"] skipDirs = @["tests"]
bin = @["raft"] bin = @["raft"]

View File

@ -12,7 +12,7 @@ proc buildLibrary(name: string, srcDir = "./", params = "", `type` = "static") =
task build, "Build static lib": task build, "Build static lib":
buildLibrary "nim-raft", "src/raft/" buildLibrary "nim-raft", "libs/raft/"
task test, "Run tests": task test, "Run tests":
exec "nim c -r tests/test_consensus_state_machine.nim " exec "nim c -r tests/test_consensus_state_machine.nim "

View File

@ -8,11 +8,11 @@
# those terms. # those terms.
import unittest2 import unittest2
import ../src/raft/types import ../libs/raft/types
import ../src/raft/consensus_state_machine import ../libs/raft/consensus_state_machine
import ../src/raft/log import ../libs/raft/log
import ../src/raft/tracker import ../libs/raft/tracker
import ../src/raft/state import ../libs/raft/state
import std/[times, sequtils] import std/[times, sequtils]
import uuids import uuids
import tables import tables