11b68f1934
rewrite broadcastTxRoutine to use channels
...
https://play.golang.org/p/gN21yO9IRs3
```
func waitWithCancel(f func() *clist.CElement, ctx context.Context) *clist.CElement {
el := make(chan *clist.CElement, 1)
select {
case el <- f():
```
will just run f() blockingly, so this doesn't change much in terms of behavior.
2018-02-05 16:36:26 +04:00
5f3048bd09
call FlushSync before calling CommitSync
...
if we call it after, we might receive a "fresh" transaction from
`broadcast_tx_sync` before old transactions (which were not
committed).
Refs #1091
```
Commit is called with a lock on the mempool, meaning no calls to CheckTx
can start. However, since CheckTx is called async in the mempool
connection, some CheckTx might have already "sailed", when the lock is
released in the mempool and Commit proceeds.
Then, that spurious CheckTx has not yet "begun" in the ABCI app (stuck
in transport?). Instead, ABCI app manages to start to process the
Commit. Next, the spurious, "sailed" CheckTx happens in the wrong place.
```
2018-01-23 16:56:14 +04:00
f06cc6630b
mempool: cfg.CacheSize and expose InitWAL
2018-01-19 01:03:03 -05:00
c9be2b89f9
mempool: return error on cached txs
2017-12-02 01:15:11 -05:00
922af7c405
int64 height
...
uint64 is considered dangerous. the details will follow in a blog post.
2017-12-01 19:04:53 -06:00
86af889dfb
remove unnecessary casts (Refs #911 )
2017-12-01 17:17:22 -05:00
b3492356e6
uint64 height (Refs #911 )
2017-12-01 17:17:22 -05:00
3595b5931a
mempool: implement Mempool.CloseWAL
...
Fixes https://github.com/tendermint/tendermint/issues/890
Add a CloseWAL method to Mempool to close the underlying WAL file
and then discard it so that further writes to it will have no effect.
2017-11-27 21:37:25 -07:00
8f0237610e
linting errors: clean it all up
2017-11-27 22:39:11 +00:00
b75d4f73e7
errcheck: PR comment fixes
2017-11-27 22:39:11 +00:00
331857c9e6
linting: apply errcheck part2
2017-11-27 22:39:11 +00:00
ac2ef9e0ea
Merge pull request #750 from tendermint/feature/cleanup
...
Cleanup of code and code docs
2017-10-23 11:14:15 -04:00
819f81f702
Change NOTE to CONTRACT
2017-10-23 11:04:45 -04:00
782a836db0
Cleanup of code and code docs
...
This cleans up some of the code in the state package
2017-10-23 11:04:45 -04:00
f908dd0e55
only notify when there are some txs (Refs #753 )
2017-10-23 10:31:00 -04:00
54f2cc9709
[docs] add how to read logs guide [ci skip]
2017-10-04 18:35:22 +04:00
88138c38cf
mempool: reactor test
2017-09-05 16:25:02 -04:00
c5a657f540
consensus: test proposal heartbeat
2017-08-10 01:24:23 -04:00
fb47ca6d35
fixes from review
2017-08-04 21:36:11 -04:00
3444bee47f
fixes from review; use mempool.TxsAvailable() directly
2017-07-28 23:42:43 -04:00
fc3fe9292f
fixes from review
2017-07-28 22:12:11 -04:00
124032e3e9
NoEmptyBlocks config option
2017-07-28 22:11:45 -04:00
4beac54bd9
no empty blocks
2017-07-28 22:11:45 -04:00
311f18bebf
mempool: comments
2017-07-17 12:58:10 -04:00
cf686d4f83
Fix commonly misspelled words
2017-05-20 21:43:00 -07:00
f8fdbe3dbc
changes as per Bucky's review
2017-05-13 16:22:51 +02:00
f803544195
new logging
2017-05-13 10:24:58 +02:00
6b059e0063
Accept relative paths in all configs, TODO: must SetRoot
2017-05-04 22:46:40 -04:00
604bf03f3a
Pulled out all config structs (except p2p.PeerConfig) into config package
2017-05-04 22:46:40 -04:00
75b6c5215f
fewer structs. remove viper from consensus
2017-05-04 22:43:55 -04:00
7c0f51e24b
remove viper from mempool
2017-05-04 22:39:22 -04:00
fcf78a5da7
cleanup go-config/viper and some unnamed imports
2017-04-25 14:54:56 -04:00
cefb2bede0
adding viper
...
int
int
2017-04-25 13:42:22 -04:00
d1926bcad1
use tmlibs
2017-04-21 18:12:54 -04:00
cbe6dbe7a1
handshake replay through consensus using mockApp
2017-02-16 17:56:45 -05:00
c147b41013
TMSP -> ABCI
2017-01-12 15:53:32 -05:00
8ec1839f5d
save block b4 apply; track stale apphash
2016-11-16 13:26:39 -05:00
2aecb2a4a3
Ensure *_wal_dir exists
2016-11-05 09:15:34 -07:00
3d3d8b5b7b
cswal -> cs_wal_dir
2016-10-30 03:55:27 -07:00
830e84adc4
Fix minor bug in Consensus WAL; Fix AutoFile dependency
2016-10-26 21:51:03 -07:00
642a24dc9c
Mempool WAL
2016-10-17 16:54:51 -07:00
b38748ad1a
Fix race condition; Refactor out txCache
2016-10-07 15:30:17 -07:00
7f31ec3398
Fix doc comment on mempool reap
2016-09-16 17:09:18 +02:00
3a7ee13ece
proxy: typed app conns
2016-08-24 01:45:45 -04:00
cadb9e8bfe
mempool: don't remove committed txs from cache
2016-07-11 12:32:24 -04:00
e8271c8a4b
update tmsp glide
2016-07-06 17:14:57 -04:00
8ca615c301
wait until txs removed from mempool to fire tx events
2016-07-05 17:03:09 -04:00
7e3e9ee9d2
rpc: broadcast tests. closes #219
2016-07-05 14:54:33 -04:00
5fb171edff
mempool: remove bad txs from cacheMap
2016-07-05 14:26:10 -04:00
7383ead106
updates for new tmsp protobuf
2016-05-23 14:35:36 -04:00