From 056f15aa53470e6cc7b1054f72165f5646ce7e73 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Sun, 21 Aug 2016 17:06:25 +0200 Subject: accounts/abi/bind/backends: remove nil and remote backends The remote backend is superseded by ethclient. The nil backend's stated purpose was to enable testing of accounts/abi/bind. None of its methods actually worked. A much simpler way to get a crashing backend is to simply pass nil as the backend. With a one-line change to the generator (removing two explicit interface assertions), passing nil actually works. Removing these backends means that less changes are required later. --- accounts/abi/bind/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accounts/abi/bind/template.go') diff --git a/accounts/abi/bind/template.go b/accounts/abi/bind/template.go index 72998bb6d..523122213 100644 --- a/accounts/abi/bind/template.go +++ b/accounts/abi/bind/template.go @@ -127,7 +127,7 @@ package {{.Package}} // New{{.Type}} creates a new instance of {{.Type}}, bound to a specific deployed contract. func New{{.Type}}(address common.Address, backend bind.ContractBackend) (*{{.Type}}, error) { - contract, err := bind{{.Type}}(address, backend.(bind.ContractCaller), backend.(bind.ContractTransactor)) + contract, err := bind{{.Type}}(address, backend, backend) if err != nil { return nil, err } -- cgit