Skip to content

Commit

Permalink
fix and optimize ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lean-apple committed Nov 8, 2023
1 parent b1a0086 commit e34ea4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ jobs:

- name: Install Bitcoin
run: |
sudo apt update && sudo apt upgrade
sudo apt update
sudo add-apt-repository ppa:luke-jr/bitcoincore
sudo apt-get update
sudo apt-get install bitcoind
- name: Check bitcoind setup with version
Expand All @@ -35,6 +34,8 @@ jobs:
EOF
bitcoind -regtest -rpcport=18444
sleep 5
bitcoind -regtest -rpcport=18445
sleep 5
- name: Run
run: cargo run
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn perform_handshake() -> Result<()> {

// Read the version message response from the peer
let mut response_buffer = [0u8; 1024]; // Adjust the buffer size as necessary.
stream.read_exact(&mut response_buffer)?;
stream.read(&mut response_buffer)?;

// Create and send a verack message as an acknowledgment
let verack_message = BitcoinMessage::new(Command::Verack, vec![], BitcoinNetwork::Regtest);
Expand All @@ -46,7 +46,7 @@ fn perform_handshake() -> Result<()> {
println!("serialized_verack_msg {:?}", serialized_verack_msg);

// Read the verack message response from the peer
stream.read_exact(&mut response_buffer)?;
stream.read(&mut response_buffer)?;

Ok(())
}
Expand Down

0 comments on commit e34ea4d

Please sign in to comment.