You are passing the transaction in as the parameters. Name it:
var results = TransactionBlock.Connection.Query<OpenMessages>
(sql,
transaction: TransactionBlock.Transaction).ToList();
Also, if it really is a stored procedure you probably want to add:
commandType: CommandType.StoredProcedure