fix(core, peer) helpers to testutil, err handling

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>