[#IsTopoSortedPackage]
= IsTopoSortedPackage
:mrdocs:

If any direct dependencies exist between transactions (i&period;e&period; a child spending the output of a parent), checks that all parents appear somewhere in the list before their respective children&period; No other ordering is enforced&period; This function cannot detect indirect dependencies (e&period;g&period; a transaction&apos;s grandparent if its parent is not present)&period;

== Synopsis

Declared in `&lt;policy&sol;packages&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
IsTopoSortedPackage(xref:Package.adoc[Package] const& txns);
----

== Return Value

true if sorted&period; False if any tx spends the output of a tx that appears later in txns&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *txns*
| Ordered list of transactions to inspect&period;
|===


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