lukechampine / walrus

A wallet server for Sia
https://lukechampine.com/docs/walrus
MIT License
12 stars 0 forks source link

Can't compile because related file NebulousLabs/Sia/crypto/merkle.go give error #7

Closed vargrant closed 4 years ago

vargrant commented 4 years ago

Can't compile because related file from SIA give error. In the same time this file not give error if I compile SIA.

make

go install -ldflags "-X 'main.githash=git rev-parse --short HEAD' -X 'main.builddate=date'" ./cmd/...

gitlab.com/NebulousLabs/Sia/crypto

../src/gitlab.com/NebulousLabs/Sia/crypto/merkle.go:249:37: cannot use lh (type *merkletree.CachedLeafHasher) as type [][]byte in argument to merkletree.VerifyDiffProof Makefile:6: recipe for target 'all' failed make: *** [all] Error 2

lukechampine commented 4 years ago

You'll need to create a go.mod so that the proper dependencies are used. I've resisted doing this because it currently requires the use of replace, which really should be fixed upstream.

Put this in a go.mod file, then try running make again:

module lukechampine.com/walrus

go 1.13

require (
    github.com/julienschmidt/httprouter v1.3.0
    gitlab.com/NebulousLabs/Sia v1.4.1
    lukechampine.com/flagg v1.1.1
    lukechampine.com/us v0.11.1
)

replace github.com/coreos/bbolt => ../../gitlab.com/NebulousLabs/Sia/vendor/github.com/coreos/bbolt

(Also make sure that you have a copy of the Sia repo at $GOPATH/src/gitlab.com/NebulousLabs/Sia)

vargrant commented 4 years ago

Thanks a lot ! Perfect !!! It's now compiled :-)

lukechampine commented 4 years ago

Glad to hear it. Please open more issues if you find bugs or missing functionality. :)

I will leave this issue open until the workaround is no longer necessary.

lukechampine commented 4 years ago

Fixed as of https://github.com/lukechampine/walrus/commit/fe86ae26c5ef3f17bd42b39b346dc916f6bd3f7e.