mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-05-28 23:20:55 +08:00
fix: accommodate poison-microblock transaction evaluation results
This commit is contained in:
@@ -38,6 +38,7 @@ use super::config::{EventKeyType, EventObserverConfig};
|
||||
use stacks::chainstate::burn::ConsensusHash;
|
||||
use stacks::chainstate::stacks::db::unconfirmed::ProcessedUnconfirmedState;
|
||||
use stacks::chainstate::stacks::miner::TransactionEvent;
|
||||
use stacks::chainstate::stacks::TransactionPayload;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
struct EventObserver {
|
||||
@@ -205,7 +206,17 @@ impl EventObserver {
|
||||
}
|
||||
}
|
||||
(true, Value::Response(_)) => STATUS_RESP_POST_CONDITION,
|
||||
_ => unreachable!(), // Transaction results should always be a Value::Response type
|
||||
_ => {
|
||||
if let TransactionOrigin::Stacks(inner_tx) = &tx {
|
||||
if let TransactionPayload::PoisonMicroblock(..) = &inner_tx.payload {
|
||||
STATUS_RESP_TRUE
|
||||
} else {
|
||||
unreachable!() // Transaction results should otherwise always be a Value::Response type
|
||||
}
|
||||
} else {
|
||||
unreachable!() // Transaction results should always be a Value::Response type
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let (txid, raw_tx) = match tx {
|
||||
|
||||
Reference in New Issue
Block a user