Skip to content

safe opcode type creation#193

Closed
kazcw wants to merge 3 commits intorust-bitcoin:masterfrom
kazcw:safe-opcodes
Closed

safe opcode type creation#193
kazcw wants to merge 3 commits intorust-bitcoin:masterfrom
kazcw:safe-opcodes

Conversation

@kazcw
Copy link
Copy Markdown

@kazcw kazcw commented Nov 11, 2018

Part of #170. Make u8 -> All safe using the newtype approach; make All -> Ordinary safe by extending the existing macro to build a match-based partial conversion function. What do you think?

@kazcw
Copy link
Copy Markdown
Author

kazcw commented Nov 11, 2018

Oh, rust 1.14.

@kazcw kazcw closed this Nov 11, 2018
@sgeisler
Copy link
Copy Markdown
Contributor

Hi, it's possible to make your PR work with 1.14.0 (travis). I have not thought about it in more depth, so I don't know if it is actually a good fix for #170, but the 1.14.0 compiler issues shouldn't be a problem. Feel free to reopen your PR :)

@kazcw
Copy link
Copy Markdown
Author

kazcw commented Nov 12, 2018

@sgeisler Thanks!

@kazcw kazcw reopened this Nov 12, 2018
@apoelstra
Copy link
Copy Markdown
Member

apoelstra commented Dec 4, 2018

I didn't notice this PR. I think it's great.

@sgeisler are you able to push your fix onto the PR? I think you're a maintainer so you should have permission.

@sgeisler
Copy link
Copy Markdown
Contributor

sgeisler commented Dec 4, 2018

@apoelstra Since the branch associated with this PR is from @kazcw's repository I don't think so. But I could open a new one with the fix applied.

@sgeisler sgeisler mentioned this pull request Dec 4, 2018
@apoelstra
Copy link
Copy Markdown
Member

Closing in favor of #198

@apoelstra apoelstra closed this Dec 9, 2018
yancyribbens pushed a commit to yancyribbens/rust-bitcoin that referenced this pull request Mar 23, 2024
Update doc for sane/insane miniscripts
PastaPastaPasta pushed a commit to PastaPastaPasta/rust-dashcore that referenced this pull request Feb 2, 2026
The sleep timeout branch introduced in rust-bitcoin#191 returns an `Err(NetworkError::Timeout)` which leads to a misbehavior update below in the `msg_result` match and eventually in a peer ban. This shouldn't happen because the `sleep` timing out only means that there is no data available right now. Instead, it now returns `Ok(None)` which will just keep things going.
PastaPastaPasta pushed a commit to PastaPastaPasta/rust-dashcore that referenced this pull request Feb 2, 2026
…-bitcoin#197)

* feat(spv): flush headers on shutdown

* move fn lower in the impl

* refactor: `MultiPeerNetworkManager` -> `PeerNetworkManager` (rust-bitcoin#184)

* refactor: `MultiPeerNetworkManager` -> `PeerNetworkManager`

* Fix formatting and apply review

* feat: Update ffi headers (rust-bitcoin#183)

* feat(spv): broadcast transaction (rust-bitcoin#180)

* fix: Fix `PeerNetworkManager` cast in `broadcast_transaction` (rust-bitcoin#185)

PR rust-bitcoin#180 used `MultiPeerNetworkManager`, this was renamed in rust-bitcoin#183 which was merged before rust-bitcoin#180 but after its CI run.

* fix: Use non-blocking `TcpStream` in `dash-spv::network::TcpConnection` (rust-bitcoin#188)

* refactor: Improve SPV shutdown handling with `CancellationToken` (rust-bitcoin#187)

* refactor: `TcpConnection` -> `Peer` and `ConnectionPool` -> `PeerPool` (rust-bitcoin#190)

* fix: Locking issue after rust-bitcoin#190 (rust-bitcoin#191)

rust-bitcoin#190 removed the read timeouts of the `Peer::receive_message` which currently leads to a lockup of the peer because the write lock is held while waiting for the message. Needs some more refactoring but this works for now.

* fix: More follow-up to rust-bitcoin#190 (rust-bitcoin#193)

The sleep timeout branch introduced in rust-bitcoin#191 returns an `Err(NetworkError::Timeout)` which leads to a misbehavior update below in the `msg_result` match and eventually in a peer ban. This shouldn't happen because the `sleep` timing out only means that there is no data available right now. Instead, it now returns `Ok(None)` which will just keep things going.

* flush after mn list sync too

* move flush to after header sync instead of mnlist

* fix

---------

Co-authored-by: Kevin Rombach <35775977+xdustinface@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants