Detecting double-spending