Commit Graph

19 Commits

Author SHA1 Message Date
Felix Lange c213fd1fd8 all: import "context" instead of "golang.org/x/net/context"
There is no need to depend on the old context package now that the
minimum Go version is 1.7. The move to "context" eliminates our weird
vendoring setup. Some vendored code still uses golang.org/x/net/context
and it is now vendored in the normal way.

This change triggered new vet checks around context.WithTimeout which
didn't fire with golang.org/x/net/context.
2017-03-22 20:49:15 +01:00
Felix Lange 9b62facdd4 event: deprecate TypeMux and related types
The Subscription type is gone, all uses are replaced by
*TypeMuxSubscription. This change is prep-work for the
introduction of the new Subscription type in a later commit.

   gorename -from '"github.com/ethereum/go-ethereum/event"::Event' -to TypeMuxEvent
   gorename -from '"github.com/ethereum/go-ethereum/event"::muxsub' -to TypeMuxSubscription
   gofmt -w -r 'Subscription -> *TypeMuxSubscription' ./event/*.go
   find . -name '*.go' -and -not -regex '\./vendor/.*' \| xargs gofmt -w -r 'event.Subscription -> *event.TypeMuxSubscription'
2017-01-25 16:25:57 +01:00
Péter Szilágyi 18c77744ff
all: fix spelling errors 2017-01-06 19:44:35 +02:00
Felix Lange 7731061903 core/vm: move Log to core/types
This significantly reduces the dependency closure of ethclient, which no
longer depends on core/vm as of this change.

All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too,
the constructor simply returned a literal.
2017-01-06 14:15:22 +01:00
Felix Lange f52a1ae849 core, core/vm, eth/filters: move Removed field into vm.Log
This field used to be assigned by the filter system and returned through
the RPC API. Now that we have a Go client that uses the underlying type,
the field needs to move. It is now assigned to true when the RemovedLogs
event is generated so the filter system doesn't need to care about the
field at all.

While here, remove the log list from ChainSideEvent. There are no users
of this field right now and any potential users could subscribe to
RemovedLogsEvent instead.
2016-12-05 10:57:11 +01:00
bas-vk b5be6b72cb eth/filter: add support for pending logs (#3219) 2016-11-28 14:59:06 +01:00
Felix Lange be3865211c core/types: remove header accessors
These accessors were introduced by light client changes, but
the only method that is actually used is GetNumberU64. This
commit replaces all uses of .GetNumberU64 with .Number.Uint64.
2016-11-09 02:19:07 +01:00
Zsolt Felfoldi 9f8d192991 les: light client protocol and API 2016-11-09 02:12:53 +01:00
Bas van Kervel 47ff813012 rpc: refactor subscriptions and filters 2016-08-17 12:59:58 +02:00
Henning Diedrich 51f8ce26cf eth: fix #2710 filter races
and locking bugs found in its wake.
2016-07-04 17:38:35 +02:00
Bas van Kervel 48cc36ce83 eth/filters: ignore logs that don't match filter criteria on chain reorg 2016-04-28 12:33:42 +02:00
Felix Lange d04a2e7557 all: update license information 2016-04-15 09:48:05 +02:00
Jeffrey Wilcke 987c1a595a eth/filters: pending logs
Pending logs are now filterable through the Go API. Filter API changed
such that each filter type has it's own bucket and adding filter
explicitly requires you specify the bucket to put it in.
2016-02-13 13:14:02 +01:00
Jeffrey Wilcke 68dda34905 eth/filters: added notifications for out of bound log events
Out of Bound log events are events that were removed due to a fork. When
logs are received the filtering mechanism should check for the `removed`
field on the json structure.
2016-02-05 16:55:27 +01:00
Felix Lange fbdb44dcc1 cmd/utils, rpc/comms: stop XEth when IPC connection ends
There are a bunch of changes required to make this work:

- in miner: allow unregistering agents, fix RemoteAgent.Stop
- in eth/filters: make FilterSystem.Stop not crash
- in rpc/comms: move listen loop to platform-independent code

Fixes #1930. I ran the shell loop there for a few minutes and didn't see
any changes in the memory profile.
2015-10-29 17:26:26 +01:00
Péter Szilágyi 402fd6e8c6 core, eth, event, miner, xeth: fix event post / subscription race 2015-10-12 16:22:03 +03:00
Jeffrey Wilcke 7c7692933c cmd/geth, cmd/utils, core, rpc: renamed to blockchain
* Renamed ChainManager to BlockChain
* Checkpointing is no longer required and never really properly worked
when the state was corrupted.
2015-10-04 01:13:56 +02:00
Jeffrey Wilcke 361082ec4b cmd/evm, core/vm, test: refactored VM and core
* Moved `vm.Transfer` to `core` package and changed execution to call
`env.Transfer` instead of `core.Transfer` directly.
* core/vm: byte code VM moved to jump table instead of switch
* Moved `vm.Transfer` to `core` package and changed execution to call
  `env.Transfer` instead of `core.Transfer` directly.
* Byte code VM now shares the same code as the JITVM
* Renamed Context to Contract
* Changed initialiser of state transition & unexported methods
* Removed the Execution object and refactor `Call`, `CallCode` &
  `Create` in to their own functions instead of being methods.
* Removed the hard dep on the state for the VM. The VM now
  depends on a Database interface returned by the environment. In the
  process the core now depends less on the statedb by usage of the env
* Moved `Log` from package `core/state` to package `core/vm`.
2015-10-04 01:13:54 +02:00
Jeffrey Wilcke f7a71996fb core, event/filter, xeth: refactored filter system
Moved the filtering system from `event` to `eth/filters` package and
removed the `core.Filter` object. The `filters.Filter` object now
requires a `common.Database` rather than a `eth.Backend` and invokes the
`core.GetBlockByX` directly rather than thru a "manager".
2015-10-02 22:47:43 +02:00