async def set_metadata(self, metadata) -> None:
    for (key, value) in metadata:
        cursor = (await self.db.execute('INSERT OR REPLACE INTO peer_metadata VALUES(?, ?)', (key, value)))
        (await cursor.close())
    (await self.db.commit())
async def set_metadata(self, metadata) -> None:
    for (key, value) in metadata:
        cursor = (await self.db.execute('INSERT OR REPLACE INTO peer_metadata VALUES(?, ?)', (key, value)))
        (await cursor.close())
    (await self.db.commit())