Private packets verification and queue refactoring (#8715)
* Verify private transaction before propagating * Private transactions queue reworked with tx pool queue direct usage * Styling fixed * Prevent resending private packets to the sender * Process signed private transaction packets via io queue * Test fixed * Build and test fixed after merge * Comments after review fixed * Signed transaction taken from verified * Fix after merge * Pool scoring generalized in order to use externally * Lib refactored according to the review comments * Ready state refactored * Redundant bound and copying removed * Fixed build after the merge * Forgotten case reworked * Review comments fixed * Logging reworked, target added * Fix after merge
This commit is contained in:
@@ -26,9 +26,9 @@ pub enum ChainMessageType {
|
||||
/// Consensus message
|
||||
Consensus(Vec<u8>),
|
||||
/// Message with private transaction
|
||||
PrivateTransaction(Vec<u8>),
|
||||
PrivateTransaction(H256, Vec<u8>),
|
||||
/// Message with signed private transaction
|
||||
SignedPrivateTransaction(Vec<u8>),
|
||||
SignedPrivateTransaction(H256, Vec<u8>),
|
||||
}
|
||||
|
||||
/// Route type to indicate whether it is enacted or retracted.
|
||||
|
||||
@@ -490,8 +490,8 @@ impl ChainNotify for TestNotify {
|
||||
fn broadcast(&self, message: ChainMessageType) {
|
||||
let data = match message {
|
||||
ChainMessageType::Consensus(data) => data,
|
||||
ChainMessageType::SignedPrivateTransaction(data) => data,
|
||||
ChainMessageType::PrivateTransaction(data) => data,
|
||||
ChainMessageType::SignedPrivateTransaction(_, data) => data,
|
||||
ChainMessageType::PrivateTransaction(_, data) => data,
|
||||
};
|
||||
self.messages.write().push(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user