Skip to content

Commit

Permalink
fix tests, temp fix for race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi committed Aug 19, 2024
1 parent 3bbcdea commit 2868ab3
Show file tree
Hide file tree
Showing 9 changed files with 462 additions and 41 deletions.
118 changes: 118 additions & 0 deletions bindings/dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,121 @@ export * from "./tari-indexer-client";
export * from "./validator-node-client";
export * from "./wallet-daemon-client";
export * from "./helpers/helpers";
export * from "./types/AccessRule";
export * from "./types/Account";
export * from "./types/Amount";
export * from "./types/ArgDef";
export * from "./types/Arg";
export * from "./types/AuthHook";
export * from "./types/Block";
export * from "./types/BucketId";
export * from "./types/Claims";
export * from "./types/Command";
export * from "./types/CommitteeInfo";
export * from "./types/CommitteeShardInfo";
export * from "./types/Committee";
export * from "./types/ComponentAccessRules";
export * from "./types/ComponentAddress";
export * from "./types/ComponentBody";
export * from "./types/ComponentHeader";
export * from "./types/ComponentKey";
export * from "./types/ConfidentialClaim";
export * from "./types/ConfidentialOutputStatement";
export * from "./types/ConfidentialOutput";
export * from "./types/ConfidentialStatement";
export * from "./types/ConfidentialTransferInputSelection";
export * from "./types/ConfidentialWithdrawProof";
export * from "./types/Decision";
export * from "./types/ElgamalVerifiableBalance";
export * from "./types/EntityId";
export * from "./types/Epoch";
export * from "./types/Event";
export * from "./types/Evidence";
export * from "./types/ExecutedTransaction";
export * from "./types/ExecuteResult";
export * from "./types/FeeBreakdown";
export * from "./types/FeeClaimAddress";
export * from "./types/FeeClaim";
export * from "./types/FeeCostBreakdown";
export * from "./types/FeeReceipt";
export * from "./types/FeeSource";
export * from "./types/FinalizeResult";
export * from "./types/ForeignProposalState";
export * from "./types/ForeignProposal";
export * from "./types/FunctionDef";
export * from "./types/IndexedValue";
export * from "./types/IndexedWellKnownTypes";
export * from "./types/InstructionResult";
export * from "./types/Instruction";
export * from "./types/JrpcPermissions";
export * from "./types/JrpcPermission";
export * from "./types/LeaderFee";
export * from "./types/LockFlag";
export * from "./types/LogEntry";
export * from "./types/LogLevel";
export * from "./types/Metadata";
export * from "./types/NetworkCommitteeInfo";
export * from "./types/NodeHeight";
export * from "./types/NonFungibleAddressContents";
export * from "./types/NonFungibleAddress";
export * from "./types/NonFungibleContainer";
export * from "./types/NonFungibleId";
export * from "./types/NonFungibleIndexAddress";
export * from "./types/NonFungibleIndex";
export * from "./types/NonFungibleToken";
export * from "./types/NonFungible";
export * from "./types/NumPreshards";
export * from "./types/Ordering";
export * from "./types/OwnerRule";
export * from "./types/PeerAddress";
export * from "./types/ProofId";
export * from "./types/QuorumCertificate";
export * from "./types/QuorumDecision";
export * from "./types/RejectReason";
export * from "./types/RequireRule";
export * from "./types/ResourceAccessRules";
export * from "./types/ResourceAddress";
export * from "./types/ResourceContainer";
export * from "./types/Resource";
export * from "./types/ResourceType";
export * from "./types/RestrictedAccessRule";
export * from "./types/RuleRequirement";
export * from "./types/ShardEvidence";
export * from "./types/ShardGroup";
export * from "./types/Shard";
export * from "./types/SubstateAddress";
export * from "./types/SubstateDestroyed";
export * from "./types/SubstateDiff";
export * from "./types/SubstateId";
export * from "./types/SubstateLockFlag";
export * from "./types/SubstateLockType";
export * from "./types/SubstateRecord";
export * from "./types/SubstateRequirement";
export * from "./types/Substate";
export * from "./types/SubstateType";
export * from "./types/SubstateValue";
export * from "./types/TemplateDef";
export * from "./types/TemplateDefV1";
export * from "./types/TransactionAtom";
export * from "./types/TransactionPoolRecord";
export * from "./types/TransactionPoolStage";
export * from "./types/TransactionReceiptAddress";
export * from "./types/TransactionReceipt";
export * from "./types/TransactionResult";
export * from "./types/TransactionSignature";
export * from "./types/TransactionStatus";
export * from "./types/Transaction";
export * from "./types/Type";
export * from "./types/UnclaimedConfidentialOutput";
export * from "./types/UnsignedTransaction";
export * from "./types/ValidatorSignature";
export * from "./types/VaultId";
export * from "./types/Vault";
export * from "./types/VersionedSubstateIdLockIntent";
export * from "./types/VersionedSubstateId";
export * from "./types/ViewableBalanceProof";
export * from "./base-node-client";
export * from "./tari-indexer-client";
export * from "./validator-node-client";
export * from "./wallet-daemon-client";
export * from "./helpers/helpers";
120 changes: 120 additions & 0 deletions bindings/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,3 +476,123 @@ export * from "./tari-indexer-client";
export * from "./validator-node-client";
export * from "./wallet-daemon-client";
export * from "./helpers/helpers";
// Copyright 2023 The Tari Project
// SPDX-License-Identifier: BSD-3-Clause
export * from "./types/AccessRule";
export * from "./types/Account";
export * from "./types/Amount";
export * from "./types/ArgDef";
export * from "./types/Arg";
export * from "./types/AuthHook";
export * from "./types/Block";
export * from "./types/BucketId";
export * from "./types/Claims";
export * from "./types/Command";
export * from "./types/CommitteeInfo";
export * from "./types/CommitteeShardInfo";
export * from "./types/Committee";
export * from "./types/ComponentAccessRules";
export * from "./types/ComponentAddress";
export * from "./types/ComponentBody";
export * from "./types/ComponentHeader";
export * from "./types/ComponentKey";
export * from "./types/ConfidentialClaim";
export * from "./types/ConfidentialOutputStatement";
export * from "./types/ConfidentialOutput";
export * from "./types/ConfidentialStatement";
export * from "./types/ConfidentialTransferInputSelection";
export * from "./types/ConfidentialWithdrawProof";
export * from "./types/Decision";
export * from "./types/ElgamalVerifiableBalance";
export * from "./types/EntityId";
export * from "./types/Epoch";
export * from "./types/Event";
export * from "./types/Evidence";
export * from "./types/ExecutedTransaction";
export * from "./types/ExecuteResult";
export * from "./types/FeeBreakdown";
export * from "./types/FeeClaimAddress";
export * from "./types/FeeClaim";
export * from "./types/FeeCostBreakdown";
export * from "./types/FeeReceipt";
export * from "./types/FeeSource";
export * from "./types/FinalizeResult";
export * from "./types/ForeignProposalState";
export * from "./types/ForeignProposal";
export * from "./types/FunctionDef";
export * from "./types/IndexedValue";
export * from "./types/IndexedWellKnownTypes";
export * from "./types/InstructionResult";
export * from "./types/Instruction";
export * from "./types/JrpcPermissions";
export * from "./types/JrpcPermission";
export * from "./types/LeaderFee";
export * from "./types/LockFlag";
export * from "./types/LogEntry";
export * from "./types/LogLevel";
export * from "./types/Metadata";
export * from "./types/NetworkCommitteeInfo";
export * from "./types/NodeHeight";
export * from "./types/NonFungibleAddressContents";
export * from "./types/NonFungibleAddress";
export * from "./types/NonFungibleContainer";
export * from "./types/NonFungibleId";
export * from "./types/NonFungibleIndexAddress";
export * from "./types/NonFungibleIndex";
export * from "./types/NonFungibleToken";
export * from "./types/NonFungible";
export * from "./types/NumPreshards";
export * from "./types/Ordering";
export * from "./types/OwnerRule";
export * from "./types/PeerAddress";
export * from "./types/ProofId";
export * from "./types/QuorumCertificate";
export * from "./types/QuorumDecision";
export * from "./types/RejectReason";
export * from "./types/RequireRule";
export * from "./types/ResourceAccessRules";
export * from "./types/ResourceAddress";
export * from "./types/ResourceContainer";
export * from "./types/Resource";
export * from "./types/ResourceType";
export * from "./types/RestrictedAccessRule";
export * from "./types/RuleRequirement";
export * from "./types/ShardEvidence";
export * from "./types/ShardGroup";
export * from "./types/Shard";
export * from "./types/SubstateAddress";
export * from "./types/SubstateDestroyed";
export * from "./types/SubstateDiff";
export * from "./types/SubstateId";
export * from "./types/SubstateLockFlag";
export * from "./types/SubstateLockType";
export * from "./types/SubstateRecord";
export * from "./types/SubstateRequirement";
export * from "./types/Substate";
export * from "./types/SubstateType";
export * from "./types/SubstateValue";
export * from "./types/TemplateDef";
export * from "./types/TemplateDefV1";
export * from "./types/TransactionAtom";
export * from "./types/TransactionPoolRecord";
export * from "./types/TransactionPoolStage";
export * from "./types/TransactionReceiptAddress";
export * from "./types/TransactionReceipt";
export * from "./types/TransactionResult";
export * from "./types/TransactionSignature";
export * from "./types/TransactionStatus";
export * from "./types/Transaction";
export * from "./types/Type";
export * from "./types/UnclaimedConfidentialOutput";
export * from "./types/UnsignedTransaction";
export * from "./types/ValidatorSignature";
export * from "./types/VaultId";
export * from "./types/Vault";
export * from "./types/VersionedSubstateIdLockIntent";
export * from "./types/VersionedSubstateId";
export * from "./types/ViewableBalanceProof";
export * from "./base-node-client";
export * from "./tari-indexer-client";
export * from "./validator-node-client";
export * from "./wallet-daemon-client";
export * from "./helpers/helpers";
121 changes: 121 additions & 0 deletions bindings/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,124 @@ export * from "./tari-indexer-client";
export * from "./validator-node-client";
export * from "./wallet-daemon-client";
export * from "./helpers/helpers";
// Copyright 2023 The Tari Project
// SPDX-License-Identifier: BSD-3-Clause

export * from "./types/AccessRule";
export * from "./types/Account";
export * from "./types/Amount";
export * from "./types/ArgDef";
export * from "./types/Arg";
export * from "./types/AuthHook";
export * from "./types/Block";
export * from "./types/BucketId";
export * from "./types/Claims";
export * from "./types/Command";
export * from "./types/CommitteeInfo";
export * from "./types/CommitteeShardInfo";
export * from "./types/Committee";
export * from "./types/ComponentAccessRules";
export * from "./types/ComponentAddress";
export * from "./types/ComponentBody";
export * from "./types/ComponentHeader";
export * from "./types/ComponentKey";
export * from "./types/ConfidentialClaim";
export * from "./types/ConfidentialOutputStatement";
export * from "./types/ConfidentialOutput";
export * from "./types/ConfidentialStatement";
export * from "./types/ConfidentialTransferInputSelection";
export * from "./types/ConfidentialWithdrawProof";
export * from "./types/Decision";
export * from "./types/ElgamalVerifiableBalance";
export * from "./types/EntityId";
export * from "./types/Epoch";
export * from "./types/Event";
export * from "./types/Evidence";
export * from "./types/ExecutedTransaction";
export * from "./types/ExecuteResult";
export * from "./types/FeeBreakdown";
export * from "./types/FeeClaimAddress";
export * from "./types/FeeClaim";
export * from "./types/FeeCostBreakdown";
export * from "./types/FeeReceipt";
export * from "./types/FeeSource";
export * from "./types/FinalizeResult";
export * from "./types/ForeignProposalState";
export * from "./types/ForeignProposal";
export * from "./types/FunctionDef";
export * from "./types/IndexedValue";
export * from "./types/IndexedWellKnownTypes";
export * from "./types/InstructionResult";
export * from "./types/Instruction";
export * from "./types/JrpcPermissions";
export * from "./types/JrpcPermission";
export * from "./types/LeaderFee";
export * from "./types/LockFlag";
export * from "./types/LogEntry";
export * from "./types/LogLevel";
export * from "./types/Metadata";
export * from "./types/NetworkCommitteeInfo";
export * from "./types/NodeHeight";
export * from "./types/NonFungibleAddressContents";
export * from "./types/NonFungibleAddress";
export * from "./types/NonFungibleContainer";
export * from "./types/NonFungibleId";
export * from "./types/NonFungibleIndexAddress";
export * from "./types/NonFungibleIndex";
export * from "./types/NonFungibleToken";
export * from "./types/NonFungible";
export * from "./types/NumPreshards";
export * from "./types/Ordering";
export * from "./types/OwnerRule";
export * from "./types/PeerAddress";
export * from "./types/ProofId";
export * from "./types/QuorumCertificate";
export * from "./types/QuorumDecision";
export * from "./types/RejectReason";
export * from "./types/RequireRule";
export * from "./types/ResourceAccessRules";
export * from "./types/ResourceAddress";
export * from "./types/ResourceContainer";
export * from "./types/Resource";
export * from "./types/ResourceType";
export * from "./types/RestrictedAccessRule";
export * from "./types/RuleRequirement";
export * from "./types/ShardEvidence";
export * from "./types/ShardGroup";
export * from "./types/Shard";
export * from "./types/SubstateAddress";
export * from "./types/SubstateDestroyed";
export * from "./types/SubstateDiff";
export * from "./types/SubstateId";
export * from "./types/SubstateLockFlag";
export * from "./types/SubstateLockType";
export * from "./types/SubstateRecord";
export * from "./types/SubstateRequirement";
export * from "./types/Substate";
export * from "./types/SubstateType";
export * from "./types/SubstateValue";
export * from "./types/TemplateDef";
export * from "./types/TemplateDefV1";
export * from "./types/TransactionAtom";
export * from "./types/TransactionPoolRecord";
export * from "./types/TransactionPoolStage";
export * from "./types/TransactionReceiptAddress";
export * from "./types/TransactionReceipt";
export * from "./types/TransactionResult";
export * from "./types/TransactionSignature";
export * from "./types/TransactionStatus";
export * from "./types/Transaction";
export * from "./types/Type";
export * from "./types/UnclaimedConfidentialOutput";
export * from "./types/UnsignedTransaction";
export * from "./types/ValidatorSignature";
export * from "./types/VaultId";
export * from "./types/Vault";
export * from "./types/VersionedSubstateIdLockIntent";
export * from "./types/VersionedSubstateId";
export * from "./types/ViewableBalanceProof";
export * from "./base-node-client";
export * from "./tari-indexer-client";
export * from "./validator-node-client";
export * from "./wallet-daemon-client";
export * from "./helpers/helpers";
7 changes: 7 additions & 0 deletions dan_layer/consensus/src/hotstuff/block_change_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ impl ProposedBlockChangeSet {
self
}

// TODO: this is a hack to allow the update to be modified after the fact. This should be removed.
pub fn next_update_mut(&mut self, transaction_id: &TransactionId) -> Option<&mut TransactionPoolStatusUpdate> {
self.transaction_changes
.get_mut(transaction_id)
.and_then(|change| change.next_update.as_mut())
}

pub fn is_accept(&self) -> bool {
matches!(self.quorum_decision, Some(QuorumDecision::Accept))
}
Expand Down
Loading

0 comments on commit 2868ab3

Please sign in to comment.