I need help? Can anyone help me?

I had a person in my life she used to come to my home to clear her doubts she is 17 and I'm 21 since her dad and my dad are friends so on that criteria she used to ask me her doubts.. at first I just did my duty ie cleared her doubts and said thank u bye bye... but after a passage of time she started focussing more on my personal details after a passage of time I too started chatting with her on a lighter note but after months passed by she started flirting with me so at first it was awkward since I was a guy who had not much knowledge any relationships but as time passed I too enjoyed... it went on and on she started telling me about us being priority any each other and many other stuffs... it was for me a rollercoaster ride... I told my friends but they warned me saying she did the same... I mean she used not that serious type... I thought they were jealous of me so I didn't pay much heed to their words one day I proposed she said no I just care for you nothing more than that... I was shocked a few days ago she was speaking about marriages and now... but controlled myself and I said ok a few weeks she didn't come to home it was fine by me after weeks she came we had general chats but again after few days she flirted with me I was horrified I told her to cutoff all the contacts with me I blocked her... did I do the right thing?
Note : I used to check her block list as I blocked her she blocked me too again unblocked me again blocked again unblocked it keeps on why?
I need help? Can anyone help me?
Post Opinion