diff options
author | ΞTHΞЯSPHΞЯΞ <{viktor.tron,nagydani,zsfelfoldi}@gmail.com> | 2016-08-30 03:18:00 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-08-31 22:19:40 +0800 |
commit | 4d300e4dece56535f56ccc32330340ce89e42581 (patch) | |
tree | 135838bfae03437eb2a50c6d66de4d66b20c3220 /contracts | |
parent | 1f58b2d084b65eaec9aa2c2ecb1d3aae50d894b3 (diff) | |
download | go-tangerine-4d300e4dece56535f56ccc32330340ce89e42581.tar.gz go-tangerine-4d300e4dece56535f56ccc32330340ce89e42581.tar.zst go-tangerine-4d300e4dece56535f56ccc32330340ce89e42581.zip |
swarm: plan bee for content storage and distribution on web3
This change imports the Swarm protocol codebase. Compared to the 'swarm'
branch, a few mostly cosmetic changes had to be made:
* The various redundant log message prefixes are gone.
* All files now have LGPLv3 license headers.
* Minor code changes were needed to please go vet and make the tests
pass on Windows.
* Further changes were required to adapt to the go-ethereum develop
branch and its new Go APIs.
Some code has not (yet) been brought over:
* swarm/cmd/bzzhash: will reappear as cmd/bzzhash later
* swarm/cmd/bzzup.sh: will be reimplemented in cmd/bzzup
* swarm/cmd/makegenesis: will reappear somehow
* swarm/examples/album: will move to a separate repository
* swarm/examples/filemanager: ditto
* swarm/examples/files: will not be merged
* swarm/test/*: will not be merged
* swarm/services/swear: will reappear as contracts/swear when needed
Diffstat (limited to 'contracts')
-rw-r--r-- | contracts/chequebook/cheque.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/contracts/chequebook/cheque.go b/contracts/chequebook/cheque.go index 8199904ef..5ece1391b 100644 --- a/contracts/chequebook/cheque.go +++ b/contracts/chequebook/cheque.go @@ -42,6 +42,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/swarm/services/swap/swap" "golang.org/x/net/context" ) @@ -408,8 +409,7 @@ func NewOutbox(chbook *Chequebook, beneficiary common.Address) *Outbox { } // Issue creates cheque. -func (self *Outbox) Issue(amount *big.Int) (interface{}, error) { - // TODO(fjl): the return type should be more descriptive. +func (self *Outbox) Issue(amount *big.Int) (swap.Promise, error) { return self.chequeBook.Issue(self.beneficiary, amount) } @@ -546,8 +546,7 @@ func (self *Inbox) autoCash(cashInterval time.Duration) { // Receive is called to deposit the latest cheque to the incoming Inbox. // The given promise must be a *Cheque. -func (self *Inbox) Receive(promise interface{}) (*big.Int, error) { - // TODO(fjl): the type of promise should be safer +func (self *Inbox) Receive(promise swap.Promise) (*big.Int, error) { ch := promise.(*Cheque) defer self.lock.Unlock() |