diff options
-rw-r--r-- | build/ci.go | 27 | ||||
-rw-r--r-- | build/pod.podspec | 2 | ||||
-rw-r--r-- | light/state_object.go | 9 | ||||
-rw-r--r-- | light/vm_env.go | 7 |
4 files changed, 35 insertions, 10 deletions
diff --git a/build/ci.go b/build/ci.go index 61e8614ed..c202480b2 100644 --- a/build/ci.go +++ b/build/ci.go @@ -72,6 +72,9 @@ var ( executablePath("abigen"), executablePath("evm"), executablePath("geth"), + executablePath("bzzd"), + executablePath("bzzhash"), + executablePath("bzzup"), executablePath("rlpdump"), } @@ -90,6 +93,18 @@ var ( Description: "Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.", }, { + Name: "bzzd", + Description: "Ethereum Swarm daemon", + }, + { + Name: "bzzup", + Description: "Ethereum Swarm command line file/directory uploader", + }, + { + Name: "bzzhash", + Description: "Ethereum Swarm file/directory hash calculator", + }, + { Name: "abigen", Description: "Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages.", }, @@ -811,13 +826,12 @@ func doXCodeFramework(cmdline []string) { // Prepare and upload a PodSpec to CocoaPods if *deploy != "" { meta := newPodMetadata(env, archive) - build.Render("build/pod.podspec", meta.Name+".podspec", 0755, meta) - build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec", "--allow-warnings", "--verbose") + build.Render("build/pod.podspec", "Geth.podspec", 0755, meta) + build.MustRunCommand("pod", *deploy, "push", "Geth.podspec", "--allow-warnings", "--verbose") } } type podMetadata struct { - Name string Version string Commit string Archive string @@ -850,14 +864,13 @@ func newPodMetadata(env build.Environment, archive string) podMetadata { } } } - name := "Geth" + version := build.VERSION() if isUnstableBuild(env) { - name += "Develop" + version += "-unstable." + env.Buildnum } return podMetadata{ - Name: name, Archive: archive, - Version: build.VERSION(), + Version: version, Commit: env.Commit, Contributors: contribs, } diff --git a/build/pod.podspec b/build/pod.podspec index a1799ecc3..2c14c280c 100644 --- a/build/pod.podspec +++ b/build/pod.podspec @@ -1,5 +1,5 @@ Pod::Spec.new do |spec| - spec.name = '{{.Name}}' + spec.name = 'Geth' spec.version = '{{.Version}}' spec.license = { :type => 'GNU Lesser General Public License, Version 3.0' } spec.homepage = 'https://github.com/ethereum/go-ethereum' diff --git a/light/state_object.go b/light/state_object.go index 61c3888fe..6161d2dfb 100644 --- a/light/state_object.go +++ b/light/state_object.go @@ -201,14 +201,19 @@ func (self *StateObject) Copy() *StateObject { // Attribute accessors // +// empty returns whether the account is considered empty. +func (self *StateObject) empty() bool { + return self.nonce == 0 && self.balance.BitLen() == 0 && bytes.Equal(self.codeHash, emptyCodeHash) +} + // Balance returns the account balance func (self *StateObject) Balance() *big.Int { return self.balance } // Address returns the address of the contract/account -func (c *StateObject) Address() common.Address { - return c.address +func (self *StateObject) Address() common.Address { + return self.address } // Code returns the contract code diff --git a/light/vm_env.go b/light/vm_env.go index 5d330b072..d4d7bcce7 100644 --- a/light/vm_env.go +++ b/light/vm_env.go @@ -263,6 +263,13 @@ func (s *VMState) Exist(addr common.Address) bool { return res } +// Empty returns true if the account at the given address is considered empty +func (s *VMState) Empty(addr common.Address) bool { + so, err := s.state.GetStateObject(s.ctx, addr) + s.errHandler(err) + return so == nil || so.empty() +} + // HasSuicided returns true if the given account has been marked for deletion // or false if the account does not exist func (s *VMState) HasSuicided(addr common.Address) bool { |