{"action":"created","issue":{"url":"https://api.github.com/repos/dashpay/dash/issues/1575","repository_url":"https://api.github.com/repos/dashpay/dash","labels_url":"https://api.github.com/repos/dashpay/dash/issues/1575/labels{/name}","comments_url":"https://api.github.com/repos/dashpay/dash/issues/1575/comments","events_url":"https://api.github.com/repos/dashpay/dash/issues/1575/events","html_url":"https://github.com/dashpay/dash/pull/1575","id":250459151,"number":1575,"title":"Backport Bitcoin PR#9609: net: fix remaining net assertions","user":{"login":"OlegGirko","id":6013515,"avatar_url":"https://avatars2.githubusercontent.com/u/6013515?v=4","gravatar_id":"","url":"https://api.github.com/users/OlegGirko","html_url":"https://github.com/OlegGirko","followers_url":"https://api.github.com/users/OlegGirko/followers","following_url":"https://api.github.com/users/OlegGirko/following{/other_user}","gists_url":"https://api.github.com/users/OlegGirko/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegGirko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegGirko/subscriptions","organizations_url":"https://api.github.com/users/OlegGirko/orgs","repos_url":"https://api.github.com/users/OlegGirko/repos","events_url":"https://api.github.com/users/OlegGirko/events{/privacy}","received_events_url":"https://api.github.com/users/OlegGirko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dashpay/dash/milestones/3","html_url":"https://github.com/dashpay/dash/milestone/3","labels_url":"https://api.github.com/repos/dashpay/dash/milestones/3/labels","id":2249697,"number":3,"title":"12.2","description":null,"creator":{"login":"schinzelh","id":636669,"avatar_url":"https://avatars0.githubusercontent.com/u/636669?v=4","gravatar_id":"","url":"https://api.github.com/users/schinzelh","html_url":"https://github.com/schinzelh","followers_url":"https://api.github.com/users/schinzelh/followers","following_url":"https://api.github.com/users/schinzelh/following{/other_user}","gists_url":"https://api.github.com/users/schinzelh/gists{/gist_id}","starred_url":"https://api.github.com/users/schinzelh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schinzelh/subscriptions","organizations_url":"https://api.github.com/users/schinzelh/orgs","repos_url":"https://api.github.com/users/schinzelh/repos","events_url":"https://api.github.com/users/schinzelh/events{/privacy}","received_events_url":"https://api.github.com/users/schinzelh/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":111,"state":"open","created_at":"2017-01-13T11:50:01Z","updated_at":"2017-08-16T01:12:20Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2017-08-15T22:39:20Z","updated_at":"2017-08-16T14:34:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dashpay/dash/pulls/1575","html_url":"https://github.com/dashpay/dash/pull/1575","diff_url":"https://github.com/dashpay/dash/pull/1575.diff","patch_url":"https://github.com/dashpay/dash/pull/1575.patch"},"body":"This is backport of Bitcoin PR bitcoin/bitcoin#9609.\r\n\r\nIt fixes assertion failures caused by sending messages to other nodes before initial handshake completed.\r\n\r\nI had to add two more commits made by myself to this PR because it makes `CConnman::ForEachNode()` and `CConnman::ForNode()` methods ignore nodes we have not completed initial handshake with, but we still need to iterate over all nodes in Dash-specific code.\r\n\r\nWhile reviewing this PR, please take a look at all occurences of `ForNode` and `ForEachNode` in Dash-specific code because I'm not sure whether there are places where I've missed adding `CConnman::AllNodes` argument to make them not ignore nodes with incomplete initial handshake (or where I should have not added this argument).\r\n\r\nThe original PR description follows.\r\n---\r\nFirst change is from @TheBlueMatt.\r\n\r\nbitcoin/bitcoin@4629656 added assertions to ensure that we never send out any messages before version negotiation has completed, but a few issues remain.\r\n\r\nIn cases where the version message failed to deserialize fully, we can end up with only some of the vars set, leading to sending messages that shouldn't be sent.\r\n\r\nAdditionally, the ForEach* functions allow the caller to send messages to all nodes, including those that aren't yet fully connected. To prevent that, filter out nodes that definitely shouldn't be sending/processing messages.\r\n\r\nAs a follow-up, I'd like to remove the assert, as I think it's done its job, but I'll save that discussion for another PR because I think @TheBlueMatt mentioned that he'd prefer to keep it."},"comment":{"url":"https://api.github.com/repos/dashpay/dash/issues/comments/322791581","html_url":"https://github.com/dashpay/dash/pull/1575#issuecomment-322791581","issue_url":"https://api.github.com/repos/dashpay/dash/issues/1575","id":322791581,"user":{"login":"OlegGirko","id":6013515,"avatar_url":"https://avatars2.githubusercontent.com/u/6013515?v=4","gravatar_id":"","url":"https://api.github.com/users/OlegGirko","html_url":"https://github.com/OlegGirko","followers_url":"https://api.github.com/users/OlegGirko/followers","following_url":"https://api.github.com/users/OlegGirko/following{/other_user}","gists_url":"https://api.github.com/users/OlegGirko/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegGirko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegGirko/subscriptions","organizations_url":"https://api.github.com/users/OlegGirko/orgs","repos_url":"https://api.github.com/users/OlegGirko/repos","events_url":"https://api.github.com/users/OlegGirko/events{/privacy}","received_events_url":"https://api.github.com/users/OlegGirko/received_events","type":"User","site_admin":false},"created_at":"2017-08-16T14:34:37Z","updated_at":"2017-08-16T14:34:37Z","body":"I've added static member definitions anyway, for compatibility with older compilers."}}
{"actor":{"display_login":"OlegGirko"}}