I've been able to successfully transfer Lamports between accounts using these two different ways but I was wondering if there were any advantages doing it one way or another. I know that in the first way, I would have to pass the system program into the accounts where as the second method I don't, but are there any other reasons why I would choose one over another?
let cpi_context = CpiContext::new(
ctx.accounts.system_program.to_account_info(),
Transfer {
from: ctx.accounts.blog.to_account_info().clone(),
to: ctx.accounts.user.clone(),
});
transfer(cpi_context, lamports)?;
vs
let user_lamports = ctx.accounts.user.lamports();
let blog_lamports = ctx.accounts.blog.to_account_info().lamports();
**ctx.accounts.user.lamports.borrow_mut() = user_lamports
.checked_add(lamports)
.unwrap();
**ctx.accounts.blog.to_account_info().lamports.borrow_mut() = blog_lamports
.checked_sub(lamports)
.unwrap();