[#TxGraph-AddDependency] = xref:TxGraph.adoc[TxGraph]::AddDependency :relfileprefix: ../ :mrdocs: Add a dependency between two specified transactions. If a staging graph exists, the dependency is only added there. Parent may not be a descendant of child already (but may be an ancestor of it already, in which case this is a no‐op). If either transaction is already removed, this is a no‐op. == Synopsis Declared in `<txgraph.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual void AddDependency( xref:TxGraph/Ref.adoc[Ref] const& parent, xref:TxGraph/Ref.adoc[Ref] const& child) noexcept = 0; ---- == Parameters [cols="1,4"] |=== | Name| Description | *parent* | Reference to the parent (spent‐from) transaction. | *child* | Reference to the child (spending) transaction. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#