mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-14 12:42:48 +02:00
The defer closure checked a local err variable for commit/rollback decisions, but err remained nil after a successful BeginTx. When txBody failed, the error was returned directly without assigning to err, so the defer always committed instead of rolling back. Additionally, since err was not a named return value, the defer's Commit error assignment was silently swallowed. Replace the error-prone defer pattern with explicit rollback on txBody failure and a direct Commit return. |
||
|---|---|---|
| .. | ||
| db | ||
| testdata | ||
| builder.go | ||
| builder_test.go | ||
| errors.go | ||
| interfaces.go | ||
| log.go | ||
| notifications_test.go | ||
| setup_test.go | ||
| stats.go | ||