[#btck_transaction_check]
= btck&lowbar;transaction&lowbar;check
:mrdocs:

Run context&hyphen;free consensus validation on a btck&lowbar;Transaction&period;

== Synopsis

Declared in `&lt;kernel&sol;bitcoinkernel&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;&lowbar;&lowbar;nonnull&lowbar;&lowbar;&rsqb;&rsqb;
int
btck&lowbar;transaction&lowbar;check(
    xref:btck_Transaction-08.adoc[btck&lowbar;Transaction] const* tx,
    xref:btck_TxValidationState-06.adoc[btck&lowbar;TxValidationState]* validation&lowbar;state);
----

== Description

Performs basic structural consensus checks (consensus&sol;tx&lowbar;check&colon;&colon;CheckTransaction) without requiring blockchain state&period;

[NOTE]
====
Only btck&lowbar;TxValidationResult&lowbar;UNSET and btck&lowbar;TxValidationResult&lowbar;CONSENSUS are reachable via this function&period;

====

== Return Value

1 if valid, 0 if invalid&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *tx* [in]
| Non&hyphen;null, the transaction to validate&period;
| *validation&lowbar;state* [out]
| Non&hyphen;null, previously created with btck&lowbar;tx&lowbar;validation&lowbar;state&lowbar;create&period; Overwritten in&hyphen;place with the validation result&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
