aboutsummaryrefslogtreecommitdiffstats
path: root/contracts
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-09-01 18:10:24 +0800
committerGitHub <noreply@github.com>2016-09-01 18:10:24 +0800
commit5cb3fa2f897756d142abe8ee9c67d96a513268b9 (patch)
treef5ae9319089384c15c844e930c9f67ee2f0c3695 /contracts
parentcc6170d7fc885f61b998712425129022413438c7 (diff)
parent4d300e4dece56535f56ccc32330340ce89e42581 (diff)
downloadgo-tangerine-5cb3fa2f897756d142abe8ee9c67d96a513268b9.tar
go-tangerine-5cb3fa2f897756d142abe8ee9c67d96a513268b9.tar.gz
go-tangerine-5cb3fa2f897756d142abe8ee9c67d96a513268b9.tar.bz2
go-tangerine-5cb3fa2f897756d142abe8ee9c67d96a513268b9.tar.lz
go-tangerine-5cb3fa2f897756d142abe8ee9c67d96a513268b9.tar.xz
go-tangerine-5cb3fa2f897756d142abe8ee9c67d96a513268b9.tar.zst
go-tangerine-5cb3fa2f897756d142abe8ee9c67d96a513268b9.zip
Merge pull request #2965 from fjl/swarm-merge
swarm: plan bee for content storage and distribution on web3
Diffstat (limited to 'contracts')
-rw-r--r--contracts/chequebook/cheque.go7
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()