Skip to content

Commit

Permalink
move definitions to -cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
alex v committed Aug 9, 2024
1 parent 04f7f1d commit 8e14dba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
10 changes: 10 additions & 0 deletions src/blsct/wallet/txfactory_global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,14 @@ CTransactionRef AggregateTransactions(const std::vector<CTransactionRef>& txs)

return MakeTransactionRef(ret);
}

int32_t GetTransactionWeight(const CTransaction& tx)
{
return ::GetSerializeSize(TX_WITH_WITNESS(tx));
}

int32_t GetTransactioOutputWeight(const CTxOut& out)
{
return ::GetSerializeSize(out);
}
} // namespace blsct
11 changes: 2 additions & 9 deletions src/blsct/wallet/txfactory_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,8 @@ enum CreateTransactionType {
CTransactionRef
AggregateTransactions(const std::vector<CTransactionRef>& txs);
UnsignedOutput CreateOutput(const blsct::DoublePublicKey& destination, const CAmount& nAmount, std::string sMemo, const TokenId& tokenId = TokenId(), const Scalar& blindingKey = Scalar::Rand(), const CreateTransactionType& type = NORMAL, const CAmount& minStake = 0);
int32_t GetTransactionWeight(const CTransaction& tx)
{
return ::GetSerializeSize(TX_WITH_WITNESS(tx));
}

int32_t GetTransactioOutputWeight(const CTxOut& out)
{
return ::GetSerializeSize(out);
}
int32_t GetTransactionWeight(const CTransaction& tx);
int32_t GetTransactioOutputWeight(const CTxOut& out);
} // namespace blsct

#endif // TXFACTORY_GLOBAL_H

0 comments on commit 8e14dba

Please sign in to comment.