mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
monero: added tx extra variants padding and mysterious minergate (#510)
* monero: read/write tx extra padding * monero: read/write tx extra mysterious minergate variant * Clippy * monero: add tx extra test for minergate + pub key * BufRead --------- Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
This commit is contained in:
@@ -64,6 +64,20 @@ mod shims {
|
||||
}
|
||||
}
|
||||
|
||||
pub trait BufRead: Read {
|
||||
fn fill_buf(&mut self) -> Result<&[u8]>;
|
||||
fn consume(&mut self, amt: usize);
|
||||
}
|
||||
|
||||
impl BufRead for &[u8] {
|
||||
fn fill_buf(&mut self) -> Result<&[u8]> {
|
||||
Ok(*self)
|
||||
}
|
||||
fn consume(&mut self, amt: usize) {
|
||||
*self = &self[amt ..];
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Write {
|
||||
fn write(&mut self, buf: &[u8]) -> Result<usize>;
|
||||
fn write_all(&mut self, buf: &[u8]) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user