mirror of
https://github.com/arnaucube/go-dvote.git
synced 2026-02-28 05:26:46 +01:00
@@ -7,7 +7,7 @@ dVote library for Relay
|
||||
|
||||
Includes a dummy generator. Example run:
|
||||
ipfs daemon &
|
||||
./dvote-relay
|
||||
./go-dvote
|
||||
and in another shell:
|
||||
./generator/generator 1000
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ package batch
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/vocdoni/dvote-relay/types"
|
||||
"github.com/vocdoni/dvote-relay/db"
|
||||
"github.com/vocdoni/go-dvote/types"
|
||||
"github.com/vocdoni/go-dvote/db"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
censusmanager "github.com/vocdoni/dvote-relay/service/census"
|
||||
censusmanager "github.com/vocdoni/go-dvote/service/census"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
// "net/http"
|
||||
// "bytes"
|
||||
// "io/ioutil"
|
||||
"github.com/vocdoni/dvote-relay/types"
|
||||
"github.com/vocdoni/dvote-relay/net"
|
||||
"github.com/vocdoni/go-dvote/types"
|
||||
"github.com/vocdoni/go-dvote/net"
|
||||
)
|
||||
|
||||
func makeBallot() string {
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"bytes"
|
||||
"os"
|
||||
"flag"
|
||||
"github.com/vocdoni/dvote-relay/batch"
|
||||
"github.com/vocdoni/dvote-relay/net"
|
||||
"github.com/vocdoni/dvote-relay/db"
|
||||
"github.com/vocdoni/dvote-relay/data"
|
||||
"github.com/vocdoni/go-dvote/batch"
|
||||
"github.com/vocdoni/go-dvote/net"
|
||||
"github.com/vocdoni/go-dvote/db"
|
||||
"github.com/vocdoni/go-dvote/data"
|
||||
)
|
||||
|
||||
var dbPath = "~/.dvote/relay.db"
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
||||
module github.com/vocdoni/dvote-relay
|
||||
module github.com/vocdoni/go-dvote
|
||||
|
||||
require (
|
||||
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 // indirect
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/vocdoni/dvote-relay/batch"
|
||||
"github.com/vocdoni/dvote-relay/types"
|
||||
"github.com/vocdoni/go-dvote/batch"
|
||||
"github.com/vocdoni/go-dvote/types"
|
||||
)
|
||||
|
||||
type HttpHandle struct {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
shell "github.com/ipfs/go-ipfs-api"
|
||||
"github.com/vocdoni/dvote-relay/batch"
|
||||
"github.com/vocdoni/dvote-relay/types"
|
||||
"github.com/vocdoni/go-dvote/batch"
|
||||
"github.com/vocdoni/go-dvote/types"
|
||||
)
|
||||
|
||||
type PubSubHandle struct {
|
||||
|
||||
@@ -8,15 +8,15 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
tree "github.com/vocdoni/dvote-relay/tree"
|
||||
signature "github.com/vocdoni/dvote-relay/crypto/signature"
|
||||
tree "github.com/vocdoni/go-dvote/tree"
|
||||
signature "github.com/vocdoni/go-dvote/crypto/signature"
|
||||
)
|
||||
|
||||
const hashSize = 32
|
||||
const authTimeWindow = 10 // Time window (seconds) in which TimeStamp will be accepted if auth enabled
|
||||
var MkTrees map[string]*tree.Tree // MerkleTree dvote-census library
|
||||
var Signatures map[string]string
|
||||
var Signature signature.SignKeys // Signature dvote-relay library
|
||||
var Signature signature.SignKeys // Signature go-dvote library
|
||||
|
||||
type Claim struct {
|
||||
CensusID string `json:"censusId"` // References to MerkleTree namespace
|
||||
|
||||
Reference in New Issue
Block a user