I'm interested in the exact method the wallet uses to determine if a transaction is confirmed or not (e.g. the number of references that a node has or a coordinator milestone).
1 Answer
tl;tr With wallet 2.5.6 and IRI 1.4.1.4 : a transaction is confirmed if and only if it is confirmed by a milestone.
To check the confirmation status of a transaction, the light wallet call the getInclusionStates
api call.
More precisely, the wallet will do that in 2 steps :
- ask to the full node it's latest solid milestone index (API GetNodeInfo). Let's call this index :
latest_solid_milestone_index_request
- ask the inclusion-state of the transaction regarding this
latest_solid_milestone_index_request
. Or in other words : "is this transaction approved directly or indirectly by this milestone ?"
On the full node, to respond to the InclusionState request, the IRI-1.4.1.4 will just check if
- the transaction is confirmed by a solid milestone
- this solid milestone index is >
latest_solid_milestone_index_request
.
If those 2 conditions are met, the transaction is 'confirmed'.