Closed Cylix closed 1 year ago
For this one, was a bit confused by the wording, but after investigation, seems that what we actually need to do is to support a new parameter depth
for isPromotable.
The implementation can be found here.
Hey @Cylix & @thibault-martinez ,
most likely we are removing isPromotable()
and keep checkConsistency()
without depth
argument & isAboveMaxDepth()
predicate.
I think IRI checks depth now: https://github.com/iotaledger/iri/blob/bed15673709a033bd32029d6e567b032ec7d5bd8/src/main/java/com/iota/iri/service/API.java#L461 https://github.com/iotaledger/iri/blob/1829df5dde8dadbc78f482d4b7db43ca0a934015/src/main/java/com/iota/iri/service/tipselection/impl/WalkValidatorImpl.java#L85
If I understand it correctly, pure checkConsistency
as seen here is sufficient. I'll create an issue in iota.js
& link you to it, as soon as I've confirmed that's the case.
Also if you use isPromotable
as the name of the call, it would be better to rename it to checkConsistency
, to match with IRI api.
From #304 (iota.lib.js changes):
Seems we have both isPromotable and checkConsistency, should we dismiss isPromotable?