1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-24 23:08:39 +01:00
Commit graph

1150 commits

Author SHA1 Message Date
Tobin Harding
cfa0f71211
Implement From instead of Into
Clippy emits:

    warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true

As suggested implement `From` instead of `Into`.
2021-07-16 11:33:24 +10:00
Tobin Harding
4eab87b60e
Remove unnecessary closure
Clippy emits:

    warning: unnecessary closure used to substitute ...

As suggested use `ok_or` instead of `ok_or_else`.
2021-07-16 11:33:24 +10:00
Tobin Harding
583cbc9323
Remove unnecessary ? operator
Clippy emits:

    warning: question mark operator is useless here

As suggested remove the unnecessary `?` operator.
2021-07-16 11:33:24 +10:00
Tobin Harding
e94ff8b9a1
Remove unnecessary borrow
Clippy emits:

    warning: this expression borrows a reference

As suggested remove the unnecessary borrow.
2021-07-16 11:33:06 +10:00
Tobin Harding
9e33cb6d9b
Fix spelling of 'hyphens' 2021-07-16 10:54:48 +10:00
Roman Zeyde
21f11a83a6
Update bitcoin dependency 2021-07-14 21:50:01 +03:00
Roman Zeyde
9c21a363e6
Merge pull request #425 from biteskola/master
Inside contrib/addr.py example, add regtest and signet networks
2021-07-08 14:05:51 +03:00
aitorjs
5854b20811 inside contrib/addr.py example, add regtest and signet networks 2021-07-07 22:38:28 +02:00
Roman Zeyde
11d703f545 Remove unneeded into_iter() 2021-07-04 18:30:23 +03:00
Roman Zeyde
c754485320 Add blockchain.scripthash.get_balance RPC 2021-07-04 18:30:23 +03:00
Roman Zeyde
4d2481ed45 Allow calling blockchain.scripthash.get_history without subscription
Fixes #419
2021-07-04 12:33:33 +03:00
Roman Zeyde
bb5caadb6b Move p2p-related code out of daemon.rs 2021-07-04 12:33:33 +03:00
Roman Zeyde
f03c1d0938 Use JSONRPC error codes
See https://www.jsonrpc.org/specification#error_object
2021-06-29 15:44:40 +03:00
Roman Zeyde
0d44ec67e2 Fix a typo 2021-06-29 15:44:40 +03:00
Roman Zeyde
94f0afaf85 Remove eprintln in tests 2021-06-29 15:44:40 +03:00
Roman Zeyde
d4134113cb Rename PREFIX_LEN -> HASH_PREFIX_LEN 2021-06-29 15:44:40 +03:00
Roman Zeyde
05d6dc1975 Elide lifetime at iter_prefix_cf() 2021-06-29 15:44:40 +03:00
Roman Zeyde
1a6d03b04a Ignore IntelliJ .idea/ dir 2021-06-29 15:44:40 +03:00
moneroexamples
6caf8017af
Added json.dumps to Python example RPC examples
As suggested in https://github.com/romanz/electrs/pull/415#issuecomment-870345086 `json.dumps` is added in-place of a manual construction of a request message.
2021-06-29 17:00:22 +08:00
moneroexamples
955910cca3
Merge branch 'romanz:master' into master 2021-06-29 16:26:51 +08:00
moneroexamples
14fed1fa81 json.loads added
As suggested, `json.loads` was added to parse the raw response.
2021-06-28 22:06:23 +03:00
moneroexamples
6bdf70d8a7 Add python example in RPC examples
Current `usage.md` contains only one example in `RPC examples` which uses `echo` and `netcat`. The PR adds new and corresponding example in `Python` which can speed up the initial use of the `electrs` for people who try to use the project for the first time.
2021-06-28 22:06:23 +03:00
moneroexamples
a31723cbb5
json.loads added
As suggested, `json.loads` was added to parse the raw response.
2021-06-28 17:44:59 +08:00
Roman Zeyde
cbf153fb09 Update dependencies 2021-06-25 18:12:41 +03:00
moneroexamples
2d4369cf93
Add python example in RPC examples
Current `usage.md` contains only one example in `RPC examples` which uses `echo` and `netcat`. The PR adds new and corresponding example in `Python` which can speed up the initial use of the `electrs` for people who try to use the project for the first time.
2021-06-25 18:38:26 +08:00
Roman Zeyde
f5884cd172 Simplify indexing code a bit 2021-06-18 20:37:53 +03:00
Roman Zeyde
423e4c7922 Rewrite Python scripts
Also, improve balance/history display
2021-06-18 17:49:29 +03:00
Roman Zeyde
b9e8aa8e7c Add a few unittests for Chain 2021-06-18 17:49:29 +03:00
Roman Zeyde
af834a009f Remove unused code 2021-06-18 13:01:16 +03:00
Roman Zeyde
45833c3b61 Use parking_lot::{Mutex, RwLock} instead of std::sync 2021-06-14 13:20:21 +03:00
Roman Zeyde
188aba50f1 Update bitcoin crate to 0.26.2 2021-06-08 20:17:12 +03:00
Roman Zeyde
d2fff752cd Build hyper when 'metrics' feature is enabled 2021-06-06 16:15:47 +03:00
Roman Zeyde
23c775fb47 Don't fail on mempool sync errors 2021-06-04 12:49:37 +03:00
Roman Zeyde
6eb8eb5227 Refactor waiting for daemon 2021-06-03 19:08:23 +03:00
Roman Zeyde
50e55aa818 Refactor status helper functions 2021-06-02 12:54:03 +03:00
Roman Zeyde
4a09f8ac8b Update dependencies 2021-05-31 21:35:48 +03:00
Roman Zeyde
8bb6d2ab20 Drop rust-crypto unneeded dependency 2021-05-31 21:26:35 +03:00
Roman Zeyde
cf078acbc6 Fixup clippy warnings 2021-05-31 18:57:06 +03:00
Roman Zeyde
df513cfb18 Don't ignore --cookie-file configuration parameter
Fixes #407
2021-05-31 16:26:58 +03:00
Roman Zeyde
2df789e053 Don't panic on incorrect metrics' configuration 2021-05-30 21:46:37 +03:00
Roman Zeyde
15ec11f8b6 Disable default features for rocksdb dependency 2021-05-30 21:38:51 +03:00
Roman Zeyde
cca0f270c2 Run sync in a loop 2021-05-30 09:29:09 +03:00
Roman Zeyde
7a200480a4 Refactor RPC connection initialization
Also, wait for IBD to finish.
2021-05-29 21:27:53 +03:00
Roman Zeyde
b0deaecdc4 Allow optional metrics collection
Can be disable by `--no-default-features`.

Also, enable RocksDB ZSTD compression (removing the feature).
2021-05-29 12:24:19 +03:00
Roman Zeyde
d4ef9a3860 Disconnect peers implicitly when closing the server
Otherwise, recv_loop fails to send Message::Done
(due to disconnected channel).
2021-05-27 20:27:54 +03:00
Roman Zeyde
52443f370f Include blockhash on missing txid for merkle proof 2021-05-26 15:21:32 +03:00
Roman Zeyde
1d4ab4f325 Remove unused configuration parameters 2021-05-26 15:18:55 +03:00
Roman Zeyde
f4102dca86 Drop peers on notification sending errors 2021-05-25 21:56:25 +03:00
Roman Zeyde
8a39d47092 Fix contrib/get_tip.py 2021-05-25 18:08:21 +03:00
Roman Zeyde
d4559a31e6 Add initial support for JSON-RPC batching 2021-05-22 21:38:34 +03:00