diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2017-03-31 18:11:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 18:11:01 +0800 |
commit | 105b37f1b4f77a50625dc997eaab9d71c52495df (patch) | |
tree | 21b3f45a59ab1288649910fc5b5dda61798e7bef /internal | |
parent | c4a0efafd71519a4ef4542af7ca492b4b50f918a (diff) | |
download | dexon-105b37f1b4f77a50625dc997eaab9d71c52495df.tar dexon-105b37f1b4f77a50625dc997eaab9d71c52495df.tar.gz dexon-105b37f1b4f77a50625dc997eaab9d71c52495df.tar.bz2 dexon-105b37f1b4f77a50625dc997eaab9d71c52495df.tar.lz dexon-105b37f1b4f77a50625dc997eaab9d71c52495df.tar.xz dexon-105b37f1b4f77a50625dc997eaab9d71c52495df.tar.zst dexon-105b37f1b4f77a50625dc997eaab9d71c52495df.zip |
swarm/api: improve FUSE build constraints, logging and APIs (#3818)
* swarm/api: fix build/tests on unsupported platforms
Skip FUSE tests if FUSE is unavailable and change build constraints so
the 'lesser' platforms aren't mentioned explicitly. The test are
compiled on all platforms to prevent regressions in _fallback.go
Also gofmt -w -s because why not.
* internal/web3ext: fix swarmfs wrappers
Remove inputFormatter specifications so users get an error
when passing the wrong number of arguments.
* swarm/api: improve FUSE-related logging and APIs
The API now returns JSON objects instead of strings.
Log messages for invalid arguments are removed.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/web3ext/web3ext.go | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 79f781781..4a8425d5c 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -29,10 +29,8 @@ var Modules = map[string]string{ "shh": Shh_JS, "swarmfs": SWARMFS_JS, "txpool": TxPool_JS, - } - const Chequebook_JS = ` web3._extend({ property: 'chequebook', @@ -491,28 +489,25 @@ web3._extend({ ` const SWARMFS_JS = ` web3._extend({ - property: 'swarmfs', - methods: - [ - new web3._extend.Method({ - name: 'mount', - call: 'swarmfs_mount', - params: 2, - inputFormatter: [null,null] - }), - new web3._extend.Method({ - name: 'unmount', - call: 'swarmfs_unmount', - params: 1, - inputFormatter: [null] - }), - new web3._extend.Method({ - name: 'listmounts', - call: 'swarmfs_listmounts', - params: 0, - inputFormatter: [] - }) - ] + property: 'swarmfs', + methods: + [ + new web3._extend.Method({ + name: 'mount', + call: 'swarmfs_mount', + params: 2 + }), + new web3._extend.Method({ + name: 'unmount', + call: 'swarmfs_unmount', + params: 1 + }), + new web3._extend.Method({ + name: 'listmounts', + call: 'swarmfs_listmounts', + params: 0 + }) + ] }); ` |