aboutsummaryrefslogtreecommitdiffstats
path: root/ethpipe
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-04 22:34:55 +0800
committerobscuren <geffobscura@gmail.com>2014-08-04 22:34:55 +0800
commit0f84b9c30d06a59f20a2d33ffd1281d5e6e2681a (patch)
tree31edfdefc6cf249f23067768719e623f7b517638 /ethpipe
parent342cc122b43f01301d0188de1e333c32ed64ae8c (diff)
downloadgo-tangerine-0f84b9c30d06a59f20a2d33ffd1281d5e6e2681a.tar.gz
go-tangerine-0f84b9c30d06a59f20a2d33ffd1281d5e6e2681a.tar.zst
go-tangerine-0f84b9c30d06a59f20a2d33ffd1281d5e6e2681a.zip
Added exist method
Diffstat (limited to 'ethpipe')
-rw-r--r--ethpipe/pipe.go4
-rw-r--r--ethpipe/pipe_test.go1
2 files changed, 5 insertions, 0 deletions
diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go
index 710fc4e7c..ca0a3416c 100644
--- a/ethpipe/pipe.go
+++ b/ethpipe/pipe.go
@@ -75,6 +75,10 @@ func (self *Pipe) ToAddress(priv []byte) []byte {
return pair.Address()
}
+func (self *Pipe) Exists(addr []byte) bool {
+ return self.World().Get(addr) != nil
+}
+
func (self *Pipe) TransactString(key *ethcrypto.KeyPair, rec string, value, gas, price *ethutil.Value, data []byte) error {
// Check if an address is stored by this address
var hash []byte
diff --git a/ethpipe/pipe_test.go b/ethpipe/pipe_test.go
index d0b8ef948..071213050 100644
--- a/ethpipe/pipe_test.go
+++ b/ethpipe/pipe_test.go
@@ -34,6 +34,7 @@ func TestNew(t *testing.T) {
pipe.Block(addr)
pipe.Storage(addr, addr)
pipe.ToAddress(privy)
+ pipe.Exists(addr)
// Doesn't change state
pipe.Execute(addr, nil, Val(0), Val(1000000), Val(10))
// Doesn't change state
zabo2019-01-066-13/+15 * vendor, crypto, swarm: switch over to upstream sha3 packageDave McGregor2019-01-045-16/+16 * p2p/protocols: accounting metrics rpc (#18336)Jerzy Lasyk2018-12-221-0/+94 * p2p/simulation: Test snapshot correctness and minimal benchmark (#18287)lash2018-12-211-0/+327 * p2p/simulation: move connection methods from swarm/network/simulation (#18323)Elad2018-12-174-12/+571 * p2p/discv5: don't hash findnode target in lookup against table (#18309)yahtoo2018-12-141-1/+1 * swarm: snapshot load improvement (#18220)Janoš Guljaš2018-12-071-0/+75 * p2p: use errors.New instead of fmt.Errorf (#18193)needkane2018-12-011-5/+4 * p2p/discv5: gofmtPéter Szilágyi2018-11-271-1/+1 * p2p/discv5: minor code simplification (#18188)ANOTHEL2018-11-271-5/+4 * p2p/protocols: fix minor comments typo (#18185)Liang Ma2018-11-271-1/+1 * Accounting metrics reporter (#18136)holisticode2018-11-274-10/+267 * core: better side-chain importingMartin Holst Swende2018-11-201-1/+1 * p2p/simulations, swarm/network: Custom services in snapshot (#17991)lash2018-11-122-6/+93 * metrics, p2p: add ephemeral registry (#18067)Kurkó Mihály2018-11-091-2/+2 * eth, p2p: fix comment typos (#18014)Corey Lin2018-11-081-1/+1 * p2p: fix comment typo (#18027)Liang Ma2018-11-081-1/+1 * p2p: use enode.ID type in metered connection (#17933)Kurkó Mihály2018-11-081-6/+5 * p2p/protocols: use keyed fields for struct instantiation (#18017)Corey Lin2018-11-071-1/+1 * p2p accounting (#17951)holisticode2018-10-265-0/+937 * p2p: meter peer traffic, emit metered peer events (#17695)Kurkó Mihály2018-10-163-18/+187 * p2p, p2p/discover: add signed ENR generation (#17753)Felix Lange2018-10-1222-266/+966 * p2p/simulations: fix a deadlock and clean up adapters (#17891)Felix Lange2018-10-127-400/+151 * Fix retrieval tests and simulation backends (#17723)holisticode2018-10-091-0/+3 * p2p: add enode URL to PeerInfo (#17838)Felix Lange2018-10-041-3/+5 * all: fix various comment typos (#17748)Liang ZOU2018-09-252-2/+2 * all: new p2p node representation (#17643)Felix Lange2018-09-2544-2127/+2388 * all: simplify s[:] to s where s is a slice (#17673)Emil2018-09-152-2/+2 * p2p/discv5: make idx bounds checking more sound (#17571)HAOYUatHZ2018-09-031-1/+1 * all: remove the duplicate 'the' in annotations (#17509)Wenbiao Zheng2018-08-271-1/+1 * p2p: fix comment typo (#17491)Mymskmkt2018-08-231-1/+1 * p2p: fix typo (#17446)Wuxiang2018-08-201-1/+1 * p2p/discv5: add delay to refresh cycle when no seed nodes are found (#16994)Felföldi Zsolt2018-08-151-1/+1 * p2p/discv5: fix negative index after uint convert to int (#17274)libotony2018-08-091-1/+1 * p2p, swarm, trie: avoid copying slices in loops (#17265)Oleg Kovalov2018-08-073-9/+9 * p2p: use safe atomic operations when changing connFlags (#17325)Felföldi Zsolt2018-08-061-6/+11 * Merge pull request #16333 from shazow/addremovetrustedpeerFelföldi Zsolt2018-08-063-8/+166 |\ | * p2p: Wrap conn.flags ops with atomic.Load/StoreAndrey Petrov2018-06-223-20/+28 | * p2p: Test for peer.rw.flags race conditionsAndrey Petrov2018-06-221-11/+18 | * p2p: Cache inbound flag on Peer.isInbound to avoid a raceAndrey Petrov2018-06-221-12/+14 | * p2p: Attempt to race check peer.Inbound() in TestServerDialAndrey Petrov2018-06-221-0/+3 | * p2p: More tests for AddTrustedPeer/RemoveTrustedPeerAndrey Petrov2018-06-221-8/+52 | * p2p: Test for MaxPeers=0 and TrustedPeer overrideAndrey Petrov2018-06-221-0/+54 | * rpc: Add admin_addTrustedPeer and admin_removeTrustedPeer.Andrey Petrov2018-06-221-3/+43 * | p2p: fix rare deadlock in Stop (#17260)Janoš Guljaš2018-07-301-1/+2 * | all: simplify switches (#17267)Oleg Kovalov2018-07-303-9/+4 * | Merge pull request #17231 from ethersphere/developViktor Trón2018-07-241-0/+18 |\ \ | * | swarm: network simulation for swarm tests (#769)Janoš Guljaš2018-07-231-0/+18 * | | p2p: token is useless in xxxEncHandshake (#17230)Wenbiao Zheng2018-07-231-8/+7 |/ / * | p2p: correct comments typo (#17184)jkcomment2018-07-181-1/+1 * | swarm: integrate OpenTracing; propagate ctx to internal APIs (#17169)Anton Evangelatov2018-07-133-13/+101 * | p2p/discover: move bond logic from table to transport (#17048)Felix Lange2018-07-036-245/+147 * | swarm: network rewrite mergeethersphere2018-06-226-76/+53 |/ * all: library changes for swarm-network-rewrite (#16898)Elad2018-06-1416-102/+494 * crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (#16932)Felix Lange2018-06-121-3/+3 * p2p/discv5: add egress/ingress traffic metrics to discv5 udp transport (#16369)Dmitry Shulyak2018-05-292-1/+12 * p2p/enr: updates for discovery v4 compatibility (#16679)Felix Lange2018-05-175-154/+277 * p2p: don't discard reason set by Disconnect (#16559)Guilherme Salgado2018-05-091-0/+1 * p2p/simulations/adapters: fix websocket log line parsing in exec adapter (#16...Ivan Daniluk2018-05-083-23/+75 * p2p: fix some golint warnings (#16577)kiel barry2018-05-0813-291/+292 * p2p: changed if-else blocks to conform with golint (#16660)GagziW2018-05-032-17/+15 * build: enable goimports and varcheck linters (#16446)thomasmodeneis2018-04-188-42/+12 * ecies: drop randomness parameter from `PrivateKey.Decrypt` (#16374)David Huie2018-03-261-2/+2 * p2p: fix doEncHandshake documentation (#16184)JU HYEONG PARK2018-02-271-4/+4 * metrics: pull library and introduce ResettingTimer and InfluxDB reporter (#15...Anton Evangelatov2018-02-231-4/+4 * p2p: remove unused code (#16158)Ivan Daniluk2018-02-232-29/+1 * Merge pull request #15919 from ethersphere/p2p-protocols-prBalint Gabor2018-02-225-0/+1316 |\ | * p2p/protocols: gofmt -w -sFelix Lange2018-02-221-22/+22 | * p2p/testing: check for all expectations in TestExchangesJanos Guljas2018-02-182-57/+200 | * p2p/protocols, p2p/testing: protocol abstraction and testingzelig2018-01-185-0/+1173 * | p2p: don't send DiscReason when using net.Pipe (#16004)Anton Evangelatov2018-02-222-5/+43 * | p2p: when peer is removed remove it also from dial history (#16060)Dmitry Shulyak2018-02-212-0/+57 * | p2p/discover: s/lastPong/bondTime/, update TestUDP_findnodeFelix Lange2018-02-175-25/+26 * | p2p/discover: validate bond against lastpong, not db presencePéter Szilágyi2018-02-161-1/+1 * | all: update license information (#16089)Felix Lange2018-02-141-0/+1 * | p2p/discover: fix out-of-bounds issuePéter Szilágyi2018-02-141-1/+1 * | rpc: dns rebind protection (#15962)Martin Holst Swende2018-02-121-1/+1 * | p2p, p2p/discover: misc connectivity improvements (#16069)Felix Lange2018-02-129-276/+795 * | p2p/discv5: fix multiple discovery issues (#16036)Felföldi Zsolt2018-02-093-27/+37 * | p2p/discv5: fix removeTicketRef cached ticket removal (#15995)Felföldi Zsolt2018-01-311-4/+4 * | p2p/discv5: fix topic register panic at shutdown (#15946)Felföldi Zsolt2018-01-231-1/+1 * | p2p/discv5: logs info about discv5 node info at bind timeMartin Holst Swende2018-01-231-0/+1 * | p2p, p2p/discover, p2p/discv5: implement UDP port sharing (#15200)Felföldi Zsolt2018-01-228-63/+114 |/ * all: update generated code (#15808)Felix Lange2018-01-081-3/+3 * core, p2p/discv5: use time.NewTicker instead of time.Tick (#15747)ferhat elmas2018-01-021-3/+3 * p2p/enr: initial implementation (#15585)Anton Evangelatov2017-12-303-0/+768 * p2p/discv5: fix reg lookup, polish code, use logger (#15737)Péter Szilágyi2017-12-284-142/+139 * p2p/discover: fix leaked goroutine in data expirationferhat elmas2017-12-181-3/+3 * p2p/simulations: fix gosimple nit (#15661)Felix Lange2017-12-131-1/+1 * p2p/simulations: add mocker functionality (#15207)holisticode2017-12-135-2/+480 * all: use gometalinter.v2, fix new gosimple issues (#15650)Zach2017-12-134-15/+14 * p2p, swarm/network/kademlia: use IsZero to check for zero time (#15603)ferhat elmas2017-12-041-1/+1 * p2p/simulations: various stability fixes (#15198)Lewis Marshall2017-12-019-56/+148 * build: enable unconvert linter (#15456)ferhat elmas2017-11-111-1/+1 * p2p/nat: delete port mapping before adding (#15222)Darrel Herbst2017-10-061-0/+1 * p2p: snappy encoding for devp2p (version bump to 5) (#15106)Péter Szilágyi2017-09-262-1/+45 * p2p: add network simulation framework (#14982)Lewis Marshall2017-09-2522-14/+4513 * p2p: change ping ticker to timer (#15071)Martin Holst Swende2017-09-041-1/+2 * discover: Changed Logging from Debug to Info (#14485)Ali Hajimirza2017-05-201-1/+1 * cmd/geth: add --config file flag (#13875)Felix Lange2017-04-124-17/+70 * p2p: if no nodes are connected, attempt dialing bootnodes (#13874)Péter Szilágyi2017-04-113-9/+121 * p2p, p2p/discover, p2p/nat: rework logging using context keysFelix Lange2017-02-2811-151/+171 * all: disable log message colors outside of gethFelix Lange2017-02-271-1/+1 * all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-2314-140/+118 * p2p: remove trailing newlines from log messagesPéter Szilágyi2017-02-235-19/+19 * crypto: add btcec fallback for sign/recover without cgo (#3680)Felix Lange2017-02-184-35/+4 * all: fix ineffectual assignments and remove uses of crypto.Sha3Felix Lange2017-01-091-3/+3 * all: fix spelling errorsPéter Szilágyi2017-01-072-2/+2 * logger, pow/dagger, pow/ezp: delete dead codeFelix Lange2017-01-071-12/+0 * all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-074-10/+4 * all: gofmt -w -sFelix Lange2017-01-0610-38/+38 * p2p/nat: fix a bytes based net.IP comparisonPéter Szilágyi2016-12-151-2/+1 * p2p/discover, p2p/discv5: use flexible comparison for IPsPéter Szilágyi2016-12-154-5/+4 * p2p/discv5: search and lookup improvementZsolt Felfoldi2016-12-082-64/+99 * p2p, p2p/discover, p2p/discv5: add IP network restriction featureFelix Lange2016-11-239-34/+124 * p2p/discover, p2p/discv5: prevent relay of invalid IPs and low portsFelix Lange2016-11-236-28/+56 * p2p/discover, p2p/discv5: use netutil.IsTemporaryErrorFelix Lange2016-11-238-248/+2 * p2p/netutil: new package for network utilitiesFelix Lange2016-11-236-0/+503 * cmd, mobile, node, p2p: surface the discovery V5 bootnodesPéter Szilágyi2016-11-152-13/+13 * mobile: initial wrappers for mobile supportPéter Szilágyi2016-11-142-3/+3 * p2p/discv5: added new bootnodesZsolt Felfoldi2016-11-141-1/+2 * p2p/discv5: fixed bootnode connect issuesZsolt Felfoldi2016-11-144-67/+107 * discv5: fixed state machine lockup bugZsolt Felfoldi2016-11-111-0/+3 * all: update license informationFelix Lange2016-11-098-8/+8 * p2p/discv5: fix build with Go 1.5, delete package testimgFelix Lange2016-11-095-879/+18 * p2p/discv5: added new topic discovery packageZsolt Felfoldi2016-11-0926-0/+7906 * Merge pull request #2914 from fjl/node-coinhabitFelix Lange2016-09-291-5/+1 |\ | * p2p/nat: delay auto discovery until first useFelix Lange2016-09-161-5/+1 * | p2p/nat: fix parameter order for AddMappingken101001472016-09-281-2/+2 |/ * Merge pull request #2740 from Firescar96/removepeerFelix Lange2016-07-293-0/+27 |\ | * node, p2p, internal: Add ability to remove peers via admin interfaceFirescar962016-07-153-0/+27 * | ethdb, p2p/discover: replace "alloted" with "allotted" (#2785)villesundell2016-07-121-1/+1 |/ * node, p2p: move network config out of ServerFelix Lange2016-05-183-23/+33 * p2p/discover: prevent bonding selfFelix Lange2016-05-031-0/+4 * p2p: improve readability of dial task scheduling codeFelix Lange2016-05-032-29/+78 * all: fix go vet warningsFelix Lange2016-04-154-8/+8 * p2p: enable EIP-8 handshake sendingFelix Lange2016-04-041-9/+1 * p2p/nat: fix #2291, NAT discovery did't abort on failurePéter Szilágyi2016-03-141-0/+1 * Merge pull request #2242 from jimenezrick/upstream-cryptoJeffrey Wilcke2016-02-248-19/+19 |\ | * all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-228-19/+19 * | p2p/discover: emphasize warning, add 10 min cooldownPéter Szilágyi2016-02-242-18/+39 * | psp/discovery: NTP sanity check clock drift in case of expirationsPéter Szilágyi2016-02-242-4/+128 |/ * p2p: EIP-8 changesFelix Lange2016-02-194-149/+443 * p2p/discover: EIP-8 changesFelix Lange2016-02-192-1/+122 * p2p/discover: fix Windows-specific issue for larger-than-buffer packetsFelix Lange2016-01-234-7/+124 * p2p/discover: attempt to deflake TestUDP_responseTimeoutsFelix Lange2015-12-181-1/+2 * p2p: resolve incomplete dial targetsFelix Lange2015-12-182-63/+175 * p2p, p2p/discover: track bootstrap state in p2p/discoverFelix Lange2015-12-186-91/+110 * p2p/discover: support incomplete node URLs, add ResolveFelix Lange2015-12-187-54/+158 * p2p: always allow dynamic dials if network not disabledPéter Szilágyi2015-12-031-1/+1 * crypto, crypto/ecies, crypto/secp256k1: libsecp256k1 scalar multGustav Simonsson2015-11-303-3/+5 * node: customizable protocol and service stacksPéter Szilágyi2015-11-274-13/+20 * Merge pull request #1934 from karalabe/polish-protocol-infosJeffrey Wilcke2015-11-043-1/+123 |\ | * eth, p2p, rpc/api: polish protocol info gatheringPéter Szilágyi2015-10-283-1/+123 * | p2p/nat: add docs for discoverFelix Lange2015-10-301-0/+3 * | Godeps: upgrade github.com/huin/goupnp to 90f71cb5Felix Lange2015-10-301-1/+6 |/ * p2p/discover: ignore packet version numbersFelix Lange2015-09-302-5/+0 * p2p/discover: remove unused lastLookup fieldFelix Lange2015-09-301-6/+1 * p2p/discover: fix race involving the seed node iteratorFelix Lange2015-09-305-172/+198 * eth, metrics, p2p: prepare metrics and net packets to eth/62Péter Szilágyi2015-08-211-1/+7 * Merge pull request #1694 from obscuren/hide-fdtrackJeffrey Wilcke2015-08-204-11/+5 |\ | * Revert "fdtrack: temporary hack for tracking file descriptor usage"Jeffrey Wilcke2015-08-204-11/+5 * | p2p/discover: don't attempt to replace nodes that are being replacedFelix Lange2015-08-192-4/+15 * | p2p: continue listening after temporary errorsFelix Lange2015-08-191-6/+25 * | p2p/discover: continue reading after temporary errorsFelix Lange2015-08-19