Skip to content

Lending pool-management messages are untested: pool lifecycle beyond borrow is uncovered #1034

Description

@nanaf6203-bit

Lending pool-management messages are untested: pool lifecycle beyond borrow is uncovered

Labels / Complexity: Contract · Rust · Trivial — Trivial

Summary

contracts/lending/src/lib.rs has 32 ink::test functions, but the pool-management edges are not among them: create_pool (line 2188 is only referenced in a test as a setup call), pool deposit/withdraw, and the pool-limit enforcement paths have no dedicated tests. A grep of the test module shows coverage of borrow/repay/liquidation basics; the pool configuration surface (limits, rates, admin setters) is unpinned.

Proposal

  • Add tests for: pool creation (auth), deposit/withdraw accounting, and the pool-limit rejection (deposits below borrows+amount, the unchecked-arithmetic site at line 929).

Acceptance criteria

  • Pool create/deposit/withdraw and the limit rejection are asserted in tests.
  • cargo test -p propchain-lending passes.

Getting started

Files: contracts/lending/src/lib.rs (lines 925-950), contracts/lending/src/tests.rs. Command: cargo test -p propchain-lending.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions