diff --git a/Godeps/_workspace/src/github.com/tendermint/tendermint/events/events.go b/Godeps/_workspace/src/github.com/tendermint/tendermint/events/events.go index 1b9f08f96569e95dbe0f1cc1f8ea77bfc1b757ab..730e7c041b11a47dca5dbbc8c33d1d852bf1cbe6 100644 --- a/Godeps/_workspace/src/github.com/tendermint/tendermint/events/events.go +++ b/Godeps/_workspace/src/github.com/tendermint/tendermint/events/events.go @@ -154,7 +154,7 @@ func (cell *eventCell) RemoveListener(listenerID string) int { func (cell *eventCell) FireEvent(data types.EventData) { cell.mtx.RLock() for _, listener := range cell.listeners { - listener(data) + listener(data) // XXX: make sure this doesn't block on removing listeners! } cell.mtx.RUnlock() } diff --git a/Godeps/_workspace/src/github.com/tendermint/tendermint/rpc/server/handlers.go b/Godeps/_workspace/src/github.com/tendermint/tendermint/rpc/server/handlers.go index b57be3057caaad545faa161a4585abc2f1a54aee..0db533e3c080769dee966684a0165e8b28aef36f 100644 --- a/Godeps/_workspace/src/github.com/tendermint/tendermint/rpc/server/handlers.go +++ b/Godeps/_workspace/src/github.com/tendermint/tendermint/rpc/server/handlers.go @@ -206,7 +206,7 @@ func _jsonStringToArg(ty reflect.Type, arg string) (reflect.Value, error) { // rpc.websocket const ( - writeChanCapacity = 20 + writeChanCapacity = 100 wsWriteTimeoutSeconds = 30 // each write times out after this wsReadTimeoutSeconds = 30 // connection times out if we haven't received *anything* in this long, not even pings. wsPingTickerSeconds = 10 // send a ping every PingTickerSeconds. @@ -269,7 +269,7 @@ func (wsc *WSConnection) OnStart() error { func (wsc *WSConnection) OnStop() { wsc.QuitService.OnStop() - wsc.evsw.RemoveListener(wsc.id) + go wsc.evsw.RemoveListener(wsc.id) // deadlocks if an event triggers Stop wsc.readTimeout.Stop() wsc.pingTicker.Stop() // The write loop closes the websocket connection diff --git a/net_test/data/local_data/local/config.toml b/net_test/data/local_data/local/config.toml deleted file mode 100644 index 1a55f5107b7f6d0bbd660d6a9498c31a510aff9e..0000000000000000000000000000000000000000 --- a/net_test/data/local_data/local/config.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -moniker = "golden_goose" -skip_upnp = true -node_laddr = "0.0.0.0:46656" -seeds = "104.236.45.149:46656" -fast_sync = false -db_backend = "leveldb" -log_level = "debug" -rpc_laddr = "0.0.0.0:46657" diff --git a/net_test/data/local_data/local/genesis.json b/net_test/data/local_data/local/genesis.json deleted file mode 100644 index 2beb2e0e7d8cf232ec5ea93a028a30048e46bba6..0000000000000000000000000000000000000000 --- a/net_test/data/local_data/local/genesis.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "genesis_time": "2016-02-25T02:52:00.489Z", - "chain_id": "net_test", - "params": null, - "accounts": [ - { - "address": "0A73F65F86271552C4858091D3DADFE3335B9272", - "amount": 2251799813685248, - "name": "", - "permissions": { - "base": { - "perms": 2302, - "set": 2302 - }, - "roles": [] - } - }, - { - "address": "3BF0230BFE5CFB2C4609EE6893137A08A0353FCF", - "amount": 2251799813685248, - "name": "", - "permissions": { - "base": { - "perms": 2302, - "set": 2302 - }, - "roles": [] - } - }, - { - "address": "6C76BECAE4692F0E44DD780C91CDF2188658B871", - "amount": 2251799813685248, - "name": "", - "permissions": { - "base": { - "perms": 2302, - "set": 2302 - }, - "roles": [] - } - }, - { - "address": "BC7721F9DBBDDEFE3384FABB7F0EBDE7A599BCF6", - "amount": 2251799813685248, - "name": "", - "permissions": { - "base": { - "perms": 2302, - "set": 2302 - }, - "roles": [] - } - } - ], - "validators": [ - { - "pub_key": [ - 1, - "520FD1AF439F68F977E5F8AEA9F6BF6FB041CD7E3640095C5838F4CFC9CD5599" - ], - "amount": 1000, - "name": "", - "unbond_to": [ - { - "address": "BC7721F9DBBDDEFE3384FABB7F0EBDE7A599BCF6", - "amount": 1000 - } - ] - }, - { - "pub_key": [ - 1, - "5A195121671DD5D06E57A53FE4165F83E3779C270837A06CA69A9142C893F3B0" - ], - "amount": 1000, - "name": "", - "unbond_to": [ - { - "address": "3BF0230BFE5CFB2C4609EE6893137A08A0353FCF", - "amount": 1000 - } - ] - }, - { - "pub_key": [ - 1, - "7571290A33CFAE246136818BF20BE9719FEDA162D2588F8B54AC2ED27F8FFEC7" - ], - "amount": 1000, - "name": "", - "unbond_to": [ - { - "address": "6C76BECAE4692F0E44DD780C91CDF2188658B871", - "amount": 1000 - } - ] - }, - { - "pub_key": [ - 1, - "053FFACC3B1F8AD855538E7B9F8E6EE8661C8170C6E159706654E5BF7F42FEFA" - ], - "amount": 1000, - "name": "", - "unbond_to": [ - { - "address": "0A73F65F86271552C4858091D3DADFE3335B9272", - "amount": 1000 - } - ] - } - ] -} \ No newline at end of file diff --git a/net_test/data/local_data/local/priv_validator.json b/net_test/data/local_data/local/priv_validator.json deleted file mode 100644 index 49862c0abe6e043e7c3b73e3b1a6011fed774f79..0000000000000000000000000000000000000000 --- a/net_test/data/local_data/local/priv_validator.json +++ /dev/null @@ -1 +0,0 @@ -{"address":"F8C21B6934E34C25067085AAB313BBFD714393EE","pub_key":[1,"0E89C57AAE3E02476A09A1498AE219A232341CF006238581EB5BB22B10CC2364"],"last_height":0,"last_round":0,"last_step":0,"priv_key":[1,"16EF1EE7895803D7BEF04B6BEE1E6B60C995B868CDA632C96B1846C12FE9A79B0E89C57AAE3E02476A09A1498AE219A232341CF006238581EB5BB22B10CC2364"]} \ No newline at end of file diff --git a/net_test/data/local_data/local/server_conf.toml b/net_test/data/local_data/local/server_conf.toml deleted file mode 100644 index e1fa06450446dcd9f91d6f3fac0744a94502ee86..0000000000000000000000000000000000000000 --- a/net_test/data/local_data/local/server_conf.toml +++ /dev/null @@ -1,26 +0,0 @@ -[bind] -address="" -port=1337 -[TLS] -tls=false -cert_path="" -key_path="" -[CORS] -enable=false -allow_origins=[] -allow_credentials=false -allow_methods=[] -allow_headers=[] -expose_headers=[] -max_age=0 -[HTTP] -json_rpc_endpoint="/rpc" -[web_socket] -websocket_endpoint="/socketrpc" -max_websocket_sessions=50 -read_buffer_size=4096 -write_buffer_size=4096 -[logging] -console_log_level="info" -file_log_level="warn" -log_file="" diff --git a/net_test/setup.sh b/net_test/setup.sh index 165883a575a658c947e9caf9759b4830586ac7ec..be361dbe36b563e184569c92b12580f9a4e71813 100644 --- a/net_test/setup.sh +++ b/net_test/setup.sh @@ -25,5 +25,7 @@ done # start the local proxy mintconfig --skip-upnp --seeds=$SEED > ./data/local/config.toml +rm -rf ./data/local_data cp -r ./data/local ./data/local_data # so we don't contaminate the real dir eris chains new --dir $(pwd)/data/local_data $NAME +#erisdb ./data/local_data &> erisdb.log & diff --git a/net_test/test.sh b/net_test/test.sh index 553e62b2cebdf56a36d0e8e53a65a29a56ebbc21..18c0a6dd5a838f5ed452956a5607612fc1ba6715 100644 --- a/net_test/test.sh +++ b/net_test/test.sh @@ -19,7 +19,7 @@ else fi set -e -N=10 +N=50 for i in `seq 1 $N`; do mintx send --to=$TO --addr=$ADDR --amt=1 --sign --broadcast --chainID=$NAME done