Function: insert(address _id, uint256 _NICR, address _prevId, address _nextId)
Add a node to the list.
Inputs
_id
Control: Fully controlled.
Constraints: No constraints.
Impact: Node's ID.
_NICR
Control: Fully controlled.
Constraints: No constraints.
Impact: Node's NICR.
_prevId
Control: Fully controlled.
Constraints: No constraints.
Impact: ID of previous node for the insert position.
_nextId
Control: Fully controlled.
Constraints: No constraints.
Impact: ID of next node for the insert position.
Branches and code coverage (including function calls)
Intended branches
Insert the node in the correct position.
Negative behavior
Revert if caller is not the trove manager.
Revert if the list already contains the node.
Revert if
_id
isaddress(0)
.Revert if
_NICR
= 0.