MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / SetPos

Method SetPos

src/streams.h:655–666  ·  view source on GitHub ↗

rewind to a given reading position

Source from the content-addressed store, hash-verified

653
654 // rewind to a given reading position
655 bool SetPos(uint64_t nPos) {
656 nReadPos = nPos;
657 if (nReadPos + nRewind < nSrcPos) {
658 nReadPos = nSrcPos - nRewind;
659 return false;
660 } else if (nReadPos > nSrcPos) {
661 nReadPos = nSrcPos;
662 return false;
663 } else {
664 return true;
665 }
666 }
667
668 bool Seek(uint64_t nPos) {
669 long nLongPos = nPos;

Callers 1

LoadExternalBlockFileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected