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

Method SetPos

src/streams.h:519–530  ·  view source on GitHub ↗

rewind to a given reading position

Source from the content-addressed store, hash-verified

517
518 // rewind to a given reading position
519 bool SetPos(uint64_t nPos) {
520 nReadPos = nPos;
521 if (nReadPos + nRewind < nSrcPos) {
522 nReadPos = nSrcPos - nRewind;
523 return false;
524 } else if (nReadPos > nSrcPos) {
525 nReadPos = nSrcPos;
526 return false;
527 } else {
528 return true;
529 }
530 }
531
532 bool Seek(uint64_t nPos) {
533 long nLongPos = nPos;

Callers 1

LoadExternalBlockFileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected