Skip to content

Commit

Permalink
Removing the electrs dependency after upgrading to ldk-node 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bjohnson5 committed Oct 22, 2024
1 parent ab51e43 commit e0ed13e
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 23 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ cd blast
./build.sh
```

### Install electrs
```bash
git clone https://github.com/blockstream/electrs && cd electrs
git checkout new-index
cargo install --path . --root /usr/local/bin
rm /usr/local/bin/.crates.toml
rm /usr/local/bin/crates2.json
```

# Run
### Run CLI
```bash
Expand Down
1 change: 0 additions & 1 deletion blast_core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
target
electrs_id.txt
Cargo.lock
4 changes: 0 additions & 4 deletions blast_core/start_bitcoind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,3 @@ do
fi
done
bitcoin-cli generatetoaddress 6 "mp76nrashrCCYLy3a8cAc5HufEas11yHbh"

electrs -vvvv --daemon-dir ~/.bitcoin --network=regtest --cookie user:pass --db-dir ~/.electrs/db > /dev/null 2>&1 &
echo $! > electrs_id.txt
echo "Started electrs with PID: $(cat electrs_id.txt)"
7 changes: 0 additions & 7 deletions blast_core/stop_bitcoind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,3 @@
bitcoin-cli stop
rm -rf ~/.bitcoin/regtest
rm ~/.bitcoin/bitcoin.conf

if [ -f electrs_id.txt ]; then
PID=$(cat electrs_id.txt)
kill -9 $PID
rm electrs_id.txt
fi
rm -rf ~/.electrs
3 changes: 1 addition & 2 deletions blast_models/blast_ldk/blast_ldk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ impl BlastRpc for BlastLdkServer {
};

let mut builder = Builder::from_config(config);
builder.set_chain_source_esplora("http://localhost:3002".to_string(), None);
//builder.set_gossip_source_rgs("https://rapidsync.lightningdevkit.org/testnet/snapshot".to_string());
builder.set_chain_source_bitcoind_rpc(String::from("127.0.0.1"), 18443, String::from("user"), String::from("pass"));
builder.set_gossip_source_p2p();

let node = Arc::new(builder.build().unwrap());
Expand Down

0 comments on commit e0ed13e

Please sign in to comment.