Instruction
AccountBorrowFailed
“instruction tries to borrow reference for an account which is already borrowed”
A program tried to borrow an account's data while it was already borrowed, often during a CPI.
Common causes
- Holding a
RefMuton an account's data while invoking a CPI that uses the same account.
How to fix it
- Drop borrows (
drop(data)or end the scope) before the CPI.